models/CuentasSearch.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 = Cuentas::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->joinWith('eMPRESA');
        $query->andFilterWhere([
            'ID' => $this->ID,
            'NRO_CUENTA' => $this->NRO_CUENTA,
        ]);
        $query->andFilterWhere(['like', 'BANCO', $this->BANCO])
            ->andFilterWhere(['like', 'TIPO', $this->TIPO])
            ->andFilterWhere(['like', 'CEDULA_RIF', $this->CEDULA_RIF])
            ->andFilterWhere(['like', 'TITULAR', $this->TITULAR])
            ->andFilterWhere(['like', 'ESTATUS', $this->ESTATUS])
            ->andFilterWhere(['like', 'eMPRESA.NOMBRE', $this->EMPRESA_ID]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Cuentas :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> joinWith ( 'eMPRESA' ) ; $ query -> andFilterWhere ( [ 'ID' => $ this -> ID , 'NRO_CUENTA' => $ this -> NRO_CUENTA , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'BANCO' , $ this -> BANCO ] ) -> andFilterWhere ( [ 'like' , 'TIPO' , $ this -> TIPO ] ) -> andFilterWhere ( [ 'like' , 'CEDULA_RIF' , $ this -> CEDULA_RIF ] ) -> andFilterWhere ( [ 'like' , 'TITULAR' , $ this -> TITULAR ] ) -> andFilterWhere ( [ 'like' , 'ESTATUS' , $ this -> ESTATUS ] ) -> andFilterWhere ( [ 'like' , 'eMPRESA.NOMBRE' , $ this -> EMPRESA_ID ] ) ; 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