models/UsuarioSearch.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 = Usuario::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'ID' => $this->ID,
            'TELEFONO' => $this->TELEFONO,
        ]);
        $query->andFilterWhere(['like', 'USUARIO', $this->USUARIO])
            ->andFilterWhere(['like', 'CLAVE', $this->CLAVE])
            ->andFilterWhere(['like', 'PRIMER_NOMBRE', $this->PRIMER_NOMBRE])
            ->andFilterWhere(['like', 'SEGUNDO_NOMBRE', $this->SEGUNDO_NOMBRE])
            ->andFilterWhere(['like', 'PRIMER_APELLIDO', $this->PRIMER_APELLIDO])
            ->andFilterWhere(['like', 'SEGUNDO_APELLIDO', $this->SEGUNDO_APELLIDO])
            ->andFilterWhere(['like', 'CEDULA', $this->CEDULA])
            ->andFilterWhere(['like', 'CORREO', $this->CORREO])
            ->andFilterWhere(['like', 'ESTATUS', $this->ESTATUS]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Usuario :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'ID' => $ this -> ID , 'TELEFONO' => $ this -> TELEFONO , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'USUARIO' , $ this -> USUARIO ] ) -> andFilterWhere ( [ 'like' , 'CLAVE' , $ this -> CLAVE ] ) -> andFilterWhere ( [ 'like' , 'PRIMER_NOMBRE' , $ this -> PRIMER_NOMBRE ] ) -> andFilterWhere ( [ 'like' , 'SEGUNDO_NOMBRE' , $ this -> SEGUNDO_NOMBRE ] ) -> andFilterWhere ( [ 'like' , 'PRIMER_APELLIDO' , $ this -> PRIMER_APELLIDO ] ) -> andFilterWhere ( [ 'like' , 'SEGUNDO_APELLIDO' , $ this -> SEGUNDO_APELLIDO ] ) -> andFilterWhere ( [ 'like' , 'CEDULA' , $ this -> CEDULA ] ) -> andFilterWhere ( [ 'like' , 'CORREO' , $ this -> CORREO ] ) -> andFilterWhere ( [ 'like' , 'ESTATUS' , $ this -> ESTATUS ] ) ; 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