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()]; }
public function behaviors() { return [array_merge(['class' => NestedSetsQueryBehavior::className()], $this->nestedSetParams)]; }
public function behaviors() { return [\creocoder\nestedsets\NestedSetsQueryBehavior::className()]; }
/** * @inheritdoc */ public function behaviors() { return ArrayHelper::merge(parent::behaviors(), [NestedSetsQueryBehavior::className()]); }