backend/models/search/PagesSearch.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 = Pages::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                'pageSize' => 100,
            ],
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'page_id' => $this->page_id,
            'page_created' => $this->page_created,
            'page_updated' => $this->page_updated,
            'page_status' => $this->page_status,
            'page_lang' => $this->page_lang,
        ]);
        $query->andFilterWhere(['like', 'page_title', $this->page_title])
            ->andFilterWhere(['like', 'page_name', $this->page_name])
            ->andFilterWhere(['like', 'page_alias', $this->page_alias])
            ->andFilterWhere(['like', 'page_keywords', $this->page_keywords])
            ->andFilterWhere(['like', 'page_description', $this->page_description])
            ->andFilterWhere(['like', 'page_text', $this->page_text]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = Pages :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , 'pagination' => [ 'pageSize' => 100 , ] , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'page_id' => $ this -> page_id , 'page_created' => $ this -> page_created , 'page_updated' => $ this -> page_updated , 'page_status' => $ this -> page_status , 'page_lang' => $ this -> page_lang , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'page_title' , $ this -> page_title ] ) -> andFilterWhere ( [ 'like' , 'page_name' , $ this -> page_name ] ) -> andFilterWhere ( [ 'like' , 'page_alias' , $ this -> page_alias ] ) -> andFilterWhere ( [ 'like' , 'page_keywords' , $ this -> page_keywords ] ) -> andFilterWhere ( [ 'like' , 'page_description' , $ this -> page_description ] ) -> andFilterWhere ( [ 'like' , 'page_text' , $ this -> page_text ] ) ; 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