Exemplo n.º 1
0
 public function search($params)
 {
     $query = DictCategory::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['is_sys' => $this->is_sys]);
     $query->andFilterWhere(['like', 'key', $this->key])->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'description', $this->description]);
     return $dataProvider;
 }
 public function actionIndex()
 {
     $query = DictCategory::find();
     $locals = LuLu::getPagedRows($query);
     return $this->render('index', $locals);
 }