basic/_protected/models/FilesSearch.php
/**
     * Creates data provider instance with search query applied
     *
     * @param array $params
     *
     * @return ActiveDataProvider
     */
Creates data provider instance with search query applied
@param array $params


Creates data provider instance with search query applied @param array $params
public function search($params)
    {
        $query = Files::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
            'company_inn' => $this->company_inn,
            'bank_mfo' => $this->bank_mfo,
            'company_account_number' => $this->company_account_number,
            'code_currency' => $this->code_currency,
            'period' => $this->period,
            'first_sum' => $this->first_sum,
            'last_sum' => $this->last_sum,
            'debit' => $this->debit,
            'credit' => $this->credit,
            'account_number_id' => $this->account_number_id,
            'currency_id' => $this->currency_id,
        ]);
        $query->andFilterWhere(['like', 'file_date', $this->file_date]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Files :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , 'company_inn' => $ this -> company_inn , 'bank_mfo' => $ this -> bank_mfo , 'company_account_number' => $ this -> company_account_number , 'code_currency' => $ this -> code_currency , 'period' => $ this -> period , 'first_sum' => $ this -> first_sum , 'last_sum' => $ this -> last_sum , 'debit' => $ this -> debit , 'credit' => $ this -> credit , 'account_number_id' => $ this -> account_number_id , 'currency_id' => $ this -> currency_id , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'file_date' , $ this -> file_date ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params
// add conditions that should always apply here // uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); // grid filtering conditions