예제 #1
0
 public function init()
 {
     parent::init();
     $this->model = new $this->query->modelClass();
     $this->baseQuery = clone $this->query;
     $this->subQuery = $this->model->getAttributesFilterRelation();
     $this->subQuery->select('owner_id, COUNT(*) as filter_matched');
     $this->subQuery->groupBy('owner_id');
     $this->subQuery->primaryModel = null;
 }
예제 #2
0
 /**
  * @param Connection|null $db
  * @return Category|array|null
  */
 public function one($db = null)
 {
     return parent::one($db);
 }
예제 #3
0
 /**
  * @inheritDoc
  */
 public function behaviors()
 {
     return ArrayHelper::merge(parent::behaviors(), [Item::SortBehavior => ['class' => ActiveQueryBehavior::class]]);
 }