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