Ejemplo n.º 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Docdba::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['ID' => $this->ID, 'PARENT' => $this->PARENT, 'CREATED_DATE' => $this->CREATED_DATE, 'STATUS' => $this->STATUS, 'USER_CREATED' => $this->USER_CREATED, 'SORT' => $this->SORT]);
     $query->andFilterWhere(['like', 'MDL_ID', $this->MDL_ID])->andFilterWhere(['like', 'MDL_NM', $this->MDL_NM])->andFilterWhere(['like', 'MDL_DB', $this->MDL_DB])->andFilterWhere(['like', 'MDL_DB_ALIAS', $this->MDL_DB_ALIAS])->andFilterWhere(['like', 'MDL_TBL', $this->MDL_TBL])->andFilterWhere(['like', 'MDL_KEY', $this->MDL_KEY])->andFilterWhere(['like', 'MDL_FLD', $this->MDL_FLD])->andFilterWhere(['like', 'MDL_CLS', $this->MDL_CLS])->andFilterWhere(['like', 'MDL_LINK', $this->MDL_LINK])->andFilterWhere(['like', 'DSCRP', $this->DSCRP])->andFilterWhere(['like', 'CORP_ID', $this->CORP_ID])->andFilterWhere(['like', 'DEP_ID', $this->DEP_ID]);
     $query->orderby(['SORT' => SORT_ASC]);
     return $dataProvider;
 }