modules/admin/models/SearchStaticPages.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 = StaticPages::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);
        $this->load($params);
        if(!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
        ]);
        $query->andFilterWhere(['like', 'Title', $this->Title])
            ->andFilterWhere(['like', 'url', $this->url])
            ->andFilterWhere(['like', 'supliers', $this->supliers])
            ->andFilterWhere(['like', 'content', $this->content]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = StaticPages :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'Title' , $ this -> Title ] ) -> andFilterWhere ( [ 'like' , 'url' , $ this -> url ] ) -> andFilterWhere ( [ 'like' , 'supliers' , $ this -> supliers ] ) -> andFilterWhere ( [ 'like' , 'content' , $ this -> content ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
Creates data provider instance with search query applied @param array $params
// uncomment the following line if you do not want to return any records when validation fails // $query->where('0=1'); //'topMenu' => $this->topMenu, //'position' => $this->position, //->andFilterWhere(['like', 'afterContent', $this->afterContent]) //->andFilterWhere(['like', 'keywords', $this->keywords]) //->andFilterWhere(['like', 'description', $this->description]);