public function searchForMods($params)
    {
        $query = static::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                'defaultPageSize' => 10,
                'forcePageParam' => false
            ],
        ]);

        $dataProvider->sort->defaultOrder = ['name' => SORT_ASC];

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere(['name' => $this->name]);

        return $dataProvider;
    }
public function searchForMods($params)
    {
        $query = static::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                'defaultPageSize' => 10,
                'forcePageParam' => false
            ],
        ]);

        $dataProvider->sort->defaultOrder = ['name' => SORT_ASC];

        if (!($this->load($params) && $this->validate())) {
            return $dataProvider;
        }

        $query->andFilterWhere(['name' => $this->name]);

        return $dataProvider;
    }
public function searchForMods ( $ params ) { $ query = static :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , 'pagination' => [ 'defaultPageSize' => 10 , 'forcePageParam' => false ] , ] ) ; $ dataProvider -> sort -> defaultOrder = [ 'name' => SORT_ASC ] ; if ( ! ( $ this -> load ( $ params ) && $ this -> validate ( ) ) ) { return $ dataProvider ; } $ query -> andFilterWhere ( [ 'name' => $ this -> name ] ) ; return $ dataProvider ; }
Searches for forums on admin page.
@param type $params
@return ActiveDataProvider
Searches for forums on admin page .