示例#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;
 }
示例#2
0
 public function behaviors()
 {
     return [TrashQueryBehavior::className()];
 }