/** * Creates data provider instance with search query applied * * @param array $params * * @return ActiveDataProvider */ public function search() { $query = GlobalConfigModel::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); if (!$this->validate()) { $query->where('1=0'); return $dataProvider; } $query->andFilterWhere(['group' => $this->group]); return $dataProvider; }