示例#1
0
 public function behaviors()
 {
     $behaviors = [];
     $model = $this->modelClass;
     //$model = new $model;
     if ($model->hasAttribute($model->removedAttribute)) {
         $behaviors[] = TrashQueryBehavior::className();
     }
     if ($model->hasAttribute('lft') && $model->hasAttribute('rgt') && $model->hasAttribute('depth')) {
         $behaviors[] = NestedSetsQueryBehavior::className();
     }
     return $behaviors;
 }
 public function behaviors()
 {
     return [NestedSetsQueryBehavior::className()];
 }
示例#3
0
 public function behaviors()
 {
     return [array_merge(['class' => NestedSetsQueryBehavior::className()], $this->nestedSetParams)];
 }
示例#4
0
 public function behaviors()
 {
     return [\creocoder\nestedsets\NestedSetsQueryBehavior::className()];
 }
示例#5
0
 /**
  * @inheritdoc
  */
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), [NestedSetsQueryBehavior::className()]);
 }