Пример #1
0
 public function search($params, $upunitcode)
 {
     $query = Helpmenu::find()->andFilterWhere(['upunitcode' => $upunitcode]);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'upunitcode' => $this->upunitcode, 'corpflag' => $this->corpflag, 'do_date' => $this->do_date, 'answerdate' => $this->answerdate, 'is_private' => $this->is_private, 'created_at' => $this->created_at, 'updated_at' => $this->updated_at]);
     $query->andFilterWhere(['like', 'unitcode', $this->unitcode])->andFilterWhere(['like', 'unitname', $this->unitname])->andFilterWhere(['like', 'upunitname', $this->upunitname])->andFilterWhere(['like', 'content', $this->content])->andFilterWhere(['like', 'introduce', $this->introduce])->andFilterWhere(['like', 'do_man', $this->do_man])->andFilterWhere(['like', 'do_man_unit', $this->do_man_unit])->andFilterWhere(['like', 'advise', $this->advise])->andFilterWhere(['like', 'answer', $this->answer])->andFilterWhere(['like', 'answercontent', $this->answercontent]);
     return $dataProvider;
 }