public function search($params) { $query = VariableModel::find(); $dataProvider = new ActiveDataProvider(['query' => $query]); if (!($this->load($params) && $this->validate())) { return $dataProvider; } $query->andFilterWhere(['data_type' => $this->data_type, 'is_cache' => $this->is_cache, 'sort_num' => $this->sort_num]); $query->andFilterWhere(['like', 'variable', $this->variable])->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'value', $this->value])->andFilterWhere(['like', 'description', $this->description]); return $dataProvider; }
public function actionIndex() { $query = Variable::find(); $locals = LuLu::getPagedRows($query); return $this->render('index', $locals); }