コード例 #1
0
ファイル: WithdrawalSearch.php プロジェクト: shuangjie/galaxy
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Withdrawal::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(['withdrawal_id' => $this->withdrawal_id, 'user_id' => $this->user_id, 'withdrawal_fee' => $this->withdrawal_fee, 'status' => $this->status, 'create_at' => $this->create_at, 'update_at' => $this->update_at]);
     $query->andFilterWhere(['like', 'withdrawal_account', $this->withdrawal_account])->andFilterWhere(['like', 'account_name', $this->account_name]);
     return $dataProvider;
 }