basic/_protected/models/FileInfoSearch.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 = FileInfo::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort'=> ['defaultOrder' => ['id' => SORT_DESC]],
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
        ]);
        $query->andFilterWhere(['like', 'bank_mfo', $this->bank_mfo])
            ->andFilterWhere(['like', 'company_account', $this->company_account])
            ->andFilterWhere(['like', 'company_inn', $this->company_inn])
            ->andFilterWhere(['like', 'file_name', $this->file_name])
            ->andFilterWhere(['like', 'file_date', $this->file_date])
            ->andFilterWhere(['like', 'data_period_start', $this->data_period_start])
            ->andFilterWhere(['like', 'data_period_end', $this->data_period_end])
            ->andFilterWhere(['like', 'depozitAfter', $this->depozitAfter])
            ->andFilterWhere(['like', 'depozitBefore', $this->depozitBefore])
            ->andFilterWhere(['like', 'countDetailToRecord', $this->countDetailToRecord])
            ->andFilterWhere(['like', 'countDetailNoRecord', $this->countDetailNoRecord]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = FileInfo :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , 'sort' => [ 'defaultOrder' => [ 'id' => SORT_DESC ] ] , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'bank_mfo' , $ this -> bank_mfo ] ) -> andFilterWhere ( [ 'like' , 'company_account' , $ this -> company_account ] ) -> andFilterWhere ( [ 'like' , 'company_inn' , $ this -> company_inn ] ) -> andFilterWhere ( [ 'like' , 'file_name' , $ this -> file_name ] ) -> andFilterWhere ( [ 'like' , 'file_date' , $ this -> file_date ] ) -> andFilterWhere ( [ 'like' , 'data_period_start' , $ this -> data_period_start ] ) -> andFilterWhere ( [ 'like' , 'data_period_end' , $ this -> data_period_end ] ) -> andFilterWhere ( [ 'like' , 'depozitAfter' , $ this -> depozitAfter ] ) -> andFilterWhere ( [ 'like' , 'depozitBefore' , $ this -> depozitBefore ] ) -> andFilterWhere ( [ 'like' , 'countDetailToRecord' , $ this -> countDetailToRecord ] ) -> andFilterWhere ( [ 'like' , 'countDetailNoRecord' , $ this -> countDetailNoRecord ] ) ; 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'); //        $query->joinWith('doc'); // grid filtering conditions //            'tip_deb_kred' => $this->tip_deb_kred, //        $query->andFilterWhere(['like','doc.tip_deb_kred', $this->id]);