Conditions | 2 |
Paths | 2 |
Total Lines | 26 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
42 | public function search($params) |
||
43 | { |
||
44 | $query = MailerDomain::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 | ]); |
||
64 | |||
65 | $query->andFilterWhere(['like', 'name', $this->name]); |
||
66 | |||
67 | return $dataProvider; |
||
68 | } |
||
70 |