Class ekstazi\crud\actions\IndexAction

Inheritanceekstazi\crud\actions\IndexAction » ekstazi\crud\actions\Action » yii\base\Action

List models action

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$checkAccess callable A PHP callable that will be called when running an action to determine if the current user has the permission to execute the action. ekstazi\crud\actions\Action
$modelClass string Class name of the model which will be handled by this action. ekstazi\crud\actions\Action
$prepareDataProvider callable A PHP callable that will be called to prepare a data provider that should return a collection of the models. ekstazi\crud\actions\IndexAction
$viewName string View file name ekstazi\crud\actions\IndexAction

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
ensureAccess() Ensure this action is allowed for current user ekstazi\crud\actions\Action
findModel() Find model by its pk from params otherwise the not found exception will be thrown ekstazi\crud\actions\Action
findModelByPk() Extract pk from params and find model ekstazi\crud\actions\Action
prepareDataProvider() Prepares the data provider that should return the requested collection of the models. ekstazi\crud\actions\IndexAction
redirect() Redirect to route passed as param ekstazi\crud\actions\Action
saveModel() ekstazi\crud\actions\Action

Property Details

$prepareDataProvider public property

A PHP callable that will be called to prepare a data provider that should return a collection of the models. If not set, prepareDataProvider() will be used instead. The signature of the callable should be:

function ($model) {
    
// $model is the model object
}

The callable should return an instance of \yii\data\ActiveDataProvider, or throw an exception if not valid params passed.

$viewName public property
string $viewName 'index'

View file name

Method Details

prepareDataProvider() protected method

Prepares the data provider that should return the requested collection of the models.

\yii\data\ActiveDataProvider prepareDataProvider$searchModel )
$searchModel

BaseActiveRecord

run() public method

void run( )
throws \yii\base\InvalidConfigException