common/models/search/Taxonomy.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
@return ActiveDataProvider
Creates data provider instance with search query applied @param array $params @return ActiveDataProvider
public function search($params)
    {
        $query = TaxonomyModel::find();
        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'sort' => ['defaultOrder' => ['id' => SORT_DESC]],
        ]);
        $this->load($params);
        if (!$this->validate()) {
            return $dataProvider;
        }
        $query->andFilterWhere([
            'id' => $this->id,
            'hierarchical' => $this->hierarchical,
            'menu_builder' => $this->menu_builder,
        ]);
        $query->andFilterWhere(['like', 'name', $this->name])
            ->andFilterWhere(['like', 'slug', $this->slug])
            ->andFilterWhere(['like', 'singular_name', $this->singular_name])
            ->andFilterWhere(['like', 'plural_name', $this->plural_name]);
        return $dataProvider;
    }
public function search ( $ params ) { $ query = TaxonomyModel :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , 'sort' => [ 'defaultOrder' => [ 'id' => SORT_DESC ] ] , ] ) ; $ this -> load ( $ params ) ; if ( ! $ this -> validate ( ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'id' => $ this -> id , 'hierarchical' => $ this -> hierarchical , 'menu_builder' => $ this -> menu_builder , ] ) ; $ query -> andFilterWhere ( [ 'like' , 'name' , $ this -> name ] ) -> andFilterWhere ( [ 'like' , 'slug' , $ this -> slug ] ) -> andFilterWhere ( [ 'like' , 'singular_name' , $ this -> singular_name ] ) -> andFilterWhere ( [ 'like' , 'plural_name' , $ this -> plural_name ] ) ; return $ dataProvider ; }
Creates data provider instance with search query applied
 @param array $params
 @return ActiveDataProvider
Creates data provider instance with search query applied @param array $params @return ActiveDataProvider