|
|
@ -89,21 +89,7 @@ use paulzi\nestedsets\NestedSetsBehavior; |
|
|
|
* @property integer $rgt |
|
|
|
* @property integer $rgt |
|
|
|
* @property integer $depth |
|
|
|
* @property integer $depth |
|
|
|
* |
|
|
|
* |
|
|
|
* @method getParents($depth = null) |
|
|
|
* @minix NestedSetsBehavior |
|
|
|
* @method getParent() |
|
|
|
|
|
|
|
* @method getRoot() |
|
|
|
|
|
|
|
* @method getDescendants($depth = null, $andSelf = false, $backOrder = false) |
|
|
|
|
|
|
|
* @method getChildren() |
|
|
|
|
|
|
|
* @method getLeaves($depth = null) |
|
|
|
|
|
|
|
* @method getPrev() |
|
|
|
|
|
|
|
* @method getNext() |
|
|
|
|
|
|
|
* @method populateTree($depth = null) |
|
|
|
|
|
|
|
* @method isRoot() |
|
|
|
|
|
|
|
* @method isLeaf() |
|
|
|
|
|
|
|
* @method makeRoot() |
|
|
|
|
|
|
|
* @method prependTo($node) |
|
|
|
|
|
|
|
* @method appendTo($node) |
|
|
|
|
|
|
|
* @method deleteWithChildren() |
|
|
|
|
|
|
|
*/ |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
class Sample extends \yii\db\ActiveRecord |
|
|
|
class Sample extends \yii\db\ActiveRecord |
|
|
@ -111,7 +97,7 @@ class Sample extends \yii\db\ActiveRecord |
|
|
|
public function behaviors() { |
|
|
|
public function behaviors() { |
|
|
|
return [ |
|
|
|
return [ |
|
|
|
[ |
|
|
|
[ |
|
|
|
'class' => NestedSetsBehavior::className(), |
|
|
|
'class' => NestedSetsBehavior::class, |
|
|
|
// 'treeAttribute' => 'tree', |
|
|
|
// 'treeAttribute' => 'tree', |
|
|
|
], |
|
|
|
], |
|
|
|
]; |
|
|
|
]; |
|
|
|