| Conditions | 2 |
| Paths | 2 |
| Total Lines | 26 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | public function search($params) |
||
| 52 | { |
||
| 53 | $query = Category::find(); |
||
| 54 | |||
| 55 | // add conditions that should always apply here |
||
| 56 | |||
| 57 | $dataProvider = new ActiveDataProvider([ |
||
| 58 | 'query' => $query, |
||
| 59 | ]); |
||
| 60 | |||
| 61 | $this->load($params); |
||
| 62 | |||
| 63 | if (!$this->validate()) { |
||
| 64 | // uncomment the following line if you do not want to return any records when validation fails |
||
| 65 | // $query->where('0=1'); |
||
| 66 | return $dataProvider; |
||
| 67 | } |
||
| 68 | |||
| 69 | // grid filtering conditions |
||
| 70 | $query->andFilterWhere([ |
||
| 71 | 'id' => $this->id, |
||
| 72 | 'created_at' => $this->created_at, |
||
| 73 | 'updated_at' => $this->updated_at, |
||
| 74 | ]); |
||
| 75 | |||
| 76 | return $dataProvider; |
||
| 77 | } |
||
| 79 |