yii2tech\admin\actions\Index::prepareDataProvider PHP 메소드

prepareDataProvider() 보호된 메소드

Prepares the data provider that should return the requested collection of the models.
protected prepareDataProvider ( Model $searchModel ) : yii\data\DataProviderInterface
$searchModel yii\base\Model search model instance.
리턴 yii\data\DataProviderInterface data provider instance.
    protected function prepareDataProvider($searchModel)
    {
        if ($this->prepareDataProvider !== null) {
            return call_user_func($this->prepareDataProvider, $searchModel, $this);
        }
        return $searchModel->search(Yii::$app->request->queryParams);
    }