basic/_protected/models/DocumentsSearch.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 = Documents::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
            'file_id' => $this->file_id,
            'tip_deb_kred' => $this->tip_deb_kred,
        ]);
        $query->andFilterWhere(['like', 'detail_date', $this->detail_date])
            ->andFilterWhere(['like', 'detail_account', $this->detail_account])
            ->andFilterWhere(['like', 'detail_inn', $this->detail_inn])
            ->andFilterWhere(['like', 'detail_name', $this->detail_name])
            ->andFilterWhere(['like', 'detail_document_number', $this->detail_document_number])
            ->andFilterWhere(['like', 'detail_mfo', $this->detail_mfo])
            ->andFilterWhere(['like', 'detail_debet', $this->detail_debet])
            ->andFilterWhere(['like', 'detail_kredit', $this->detail_kredit])
            ->andFilterWhere(['like', 'detail_purpose_of_payment', $this->detail_purpose_of_payment])
            ->andFilterWhere(['like', 'code_currency', $this->code_currency])
            ->andFilterWhere(['like', 'contract_date', $this->contract_date]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Documents :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , 'file_id' => $ this -> file_id , 'tip_deb_kred' => $ this -> tip_deb_kred , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'detail_date' , $ this -> detail_date ] ) -> andFilterWhere ( [ 'like' , 'detail_account' , $ this -> detail_account ] ) -> andFilterWhere ( [ 'like' , 'detail_inn' , $ this -> detail_inn ] ) -> andFilterWhere ( [ 'like' , 'detail_name' , $ this -> detail_name ] ) -> andFilterWhere ( [ 'like' , 'detail_document_number' , $ this -> detail_document_number ] ) -> andFilterWhere ( [ 'like' , 'detail_mfo' , $ this -> detail_mfo ] ) -> andFilterWhere ( [ 'like' , 'detail_debet' , $ this -> detail_debet ] ) -> andFilterWhere ( [ 'like' , 'detail_kredit' , $ this -> detail_kredit ] ) -> andFilterWhere ( [ 'like' , 'detail_purpose_of_payment' , $ this -> detail_purpose_of_payment ] ) -> andFilterWhere ( [ 'like' , 'code_currency' , $ this -> code_currency ] ) -> andFilterWhere ( [ 'like' , 'contract_date' , $ this -> contract_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