$query, 'sort' => [ 'defaultOrder' => ['id' => SORT_DESC] ] ]); $this->load($params); if (!$this->validate()) { $query->where('0=1'); return $dataProvider; } $query->andFilterWhere([ 'id' => $this->id, 'active' => $this->active, 'width' => $this->width, 'height' => $this->height ]); $query ->andFilterWhere(['like', 'title', $this->title]); return $dataProvider; } }