/** * @param array|null $params * * @return ActiveDataProvider */ public function search($params) { $query = ConquerableStation::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); if (!$this->load($params) && !$this->validate()) { return $dataProvider; } $query->andFilterWhere(['like', 'stationID', $this->stationID])->andFilterWhere(['like', 'solarSystemID', $this->solarSystemID])->andFilterWhere(['like', 'stationName', $this->stationName]); return $dataProvider; }