Browse Source

Merge pull request #12 from defk/patch-1

В описание модели добавлены PhpDoc-свойства для работы автодополнений в IDE
master
PaulZi 7 years ago committed by GitHub
parent
commit
6b99daf279
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      README.md

11
README.md

@ -83,12 +83,21 @@ class m150722_150100_multiple_tree extends Migration
```php ```php
use paulzi\nestedsets\NestedSetsBehavior; use paulzi\nestedsets\NestedSetsBehavior;
/**
* @property integer $id
* @property integer $lft
* @property integer $rgt
* @property integer $depth
*
* @mixin NestedSetsBehavior
*/
class Sample extends \yii\db\ActiveRecord class Sample extends \yii\db\ActiveRecord
{ {
public function behaviors() { public function behaviors() {
return [ return [
[ [
'class' => NestedSetsBehavior::className(), 'class' => NestedSetsBehavior::class,
// 'treeAttribute' => 'tree', // 'treeAttribute' => 'tree',
], ],
]; ];

Loading…
Cancel
Save