private function searchActiveDataProvider($params)
    {
        /** @var ActiveRecord $model */
        $model = $this->identityImplement;
        $query = $model::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

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

        foreach ($model::getTableSchema()->columns as $attribute => $column) {
            if ($column->phpType === 'string') {
                $query->andFilterWhere(['like', $attribute, $model->getAttribute($attribute)]);
            } else {
                $query->andFilterWhere([$attribute => $model->getAttribute($attribute)]);
            }
        }

        return $dataProvider;
    }
private function searchActiveDataProvider($params)
    {
        /** @var ActiveRecord $model */
        $model = $this->identityImplement;
        $query = $model::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
        ]);

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

        foreach ($model::getTableSchema()->columns as $attribute => $column) {
            if ($column->phpType === 'string') {
                $query->andFilterWhere(['like', $attribute, $model->getAttribute($attribute)]);
            } else {
                $query->andFilterWhere([$attribute => $model->getAttribute($attribute)]);
            }
        }

        return $dataProvider;
    }
private function searchActiveDataProvider ( $ params ) { /** @var ActiveRecord $model */ $ model = $ this -> identityImplement ; $ query = $ model :: find ( ) ; $ dataProvider = new ActiveDataProvider ( [ 'query' => $ query , ] ) ; if ( ! ( $ this -> load ( $ params ) && $ this -> validate ( ) ) ) { return $ dataProvider ; } foreach ( $ model :: getTableSchema ( ) -> columns as $ attribute => $ column ) { if ( $ column -> phpType === 'string' ) { $ query -> andFilterWhere ( [ 'like' , $ attribute , $ model -> getAttribute ( $ attribute ) ] ) ; } else { $ query -> andFilterWhere ( [ $ attribute => $ model -> getAttribute ( $ attribute ) ] ) ; } } return $ dataProvider ; }
Search method for ActiveRecord
@param array $params the data array to load model.
@return ActiveDataProvider
@throws \yii\base\InvalidConfigException
Search method for ActiveRecord