| Conditions | 2 |
| Paths | 2 |
| Total Lines | 28 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function search($params) |
||
| 43 | { |
||
| 44 | $query = MailerAlias::find(); |
||
| 45 | |||
| 46 | // add conditions that should always apply here |
||
| 47 | |||
| 48 | $dataProvider = new ActiveDataProvider([ |
||
| 49 | 'query' => $query, |
||
| 50 | ]); |
||
| 51 | |||
| 52 | $this->load($params); |
||
| 53 | |||
| 54 | if (!$this->validate()) { |
||
| 55 | // uncomment the following line if you do not want to return any records when validation fails |
||
| 56 | // $query->where('0=1'); |
||
| 57 | return $dataProvider; |
||
| 58 | } |
||
| 59 | |||
| 60 | // grid filtering conditions |
||
| 61 | $query->andFilterWhere([ |
||
| 62 | 'id' => $this->id, |
||
| 63 | 'domain_id' => $this->domain_id, |
||
| 64 | ]); |
||
| 65 | |||
| 66 | $query->andFilterWhere(['like', 'source', $this->source]) |
||
| 67 | ->andFilterWhere(['like', 'destination', $this->destination]); |
||
| 68 | |||
| 69 | return $dataProvider; |
||
| 70 | } |
||
| 72 |