From cb5aaec40bada64451c53a06119fc17e1348b52e Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 23 Jul 2018 08:21:14 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=D0=92=20=D0=BE=D0=BF=D0=B8=D1=81=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D1=8B=20PhpDoc?= =?UTF-8?q?-=D1=81=D0=B2=D0=BE=D0=B9=D1=81=D1=82=D0=B2=D0=B0=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D0=B0?= =?UTF-8?q?=D0=B2=D1=82=D0=BE=D0=B4=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9=20=D0=B2=20IDE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e18f544..f29abf6 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,29 @@ class m150722_150100_multiple_tree extends Migration ```php use paulzi\nestedsets\NestedSetsBehavior; +/** + * @property integer $id + * @property integer $lft + * @property integer $rgt + * @property integer $depth + * + * @method getParents($depth = null) + * @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 { public function behaviors() { @@ -291,4 +314,4 @@ To delete a node with descendants: $node11 = Sample::findOne(['name' => 'node 1.1']); $node11->delete(); // delete node, children come up to the parent $node11->deleteWithChildren(); // delete node and all descendants -``` \ No newline at end of file +``` From ccc1a0418cbb7927cba2def2b6a98e5065933adf Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 23 Jul 2018 13:12:09 +0300 Subject: [PATCH 2/3] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=20autocomplete?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index f29abf6..9498baa 100644 --- a/README.md +++ b/README.md @@ -89,21 +89,7 @@ use paulzi\nestedsets\NestedSetsBehavior; * @property integer $rgt * @property integer $depth * - * @method getParents($depth = null) - * @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() + * @minix NestedSetsBehavior */ class Sample extends \yii\db\ActiveRecord @@ -111,7 +97,7 @@ class Sample extends \yii\db\ActiveRecord public function behaviors() { return [ [ - 'class' => NestedSetsBehavior::className(), + 'class' => NestedSetsBehavior::class, // 'treeAttribute' => 'tree', ], ]; From 3f6eefa6f4999502e0a5c577b477d67bf2844616 Mon Sep 17 00:00:00 2001 From: Andrew Date: Mon, 23 Jul 2018 14:21:09 +0300 Subject: [PATCH 3/3] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D0=BF=D0=B5=D1=87=D0=B0=D1=82=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9498baa..5070925 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ use paulzi\nestedsets\NestedSetsBehavior; * @property integer $rgt * @property integer $depth * - * @minix NestedSetsBehavior + * @mixin NestedSetsBehavior */ class Sample extends \yii\db\ActiveRecord