models/ListaSearch.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 = Lista::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->joinWith('dISTRIBUCION');
        $query->andFilterWhere([
            'LISTA.ID' => $this->ID,
            'FECHA_CREACION' => $this->FECHA_CREACION,
            'ESTATUS_LISTA' => $this->ESTATUS_LISTA,
        ]);
        $query->andFilterWhere(['like', 'dISTRIBUCION.DESCRIPCION', $this->DISTRIBUCION_ID]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Lista :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> joinWith ( 'dISTRIBUCION' ) ; $ query -> andFilterWhere ( [ 'LISTA.ID' => $ this -> ID , 'FECHA_CREACION' => $ this -> FECHA_CREACION , 'ESTATUS_LISTA' => $ this -> ESTATUS_LISTA , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'dISTRIBUCION.DESCRIPCION' , $ this -> DISTRIBUCION_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 // 'DISTRIBUCION_ID' => $this->DISTRIBUCION_ID,