예제 #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = DcmdSoftpkg::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'app_id' => $this->app_id, 'svr_id' => $this->svr_id, 'utime' => $this->utime, 'ctime' => $this->ctime, 'opr_uid' => $this->opr_uid]);
     $query->andFilterWhere(['like', 'version', $this->version])->andFilterWhere(['like', 'repo_file', $this->repo_file])->andFilterWhere(['like', 'upload_file', $this->upload_file]);
     return $dataProvider;
 }