PHP Class yii2tech\admin\CrudController

The class of the ActiveRecord should be specified via [[modelClass]], which must implement ActiveRecordInterface. By default, the following actions are supported: - index: list of models - view: the details of a model - create: create a new model - update: update an existing model - delete: delete an existing model You may disable some of these actions by overriding CrudController::actions and unsetting the corresponding actions.
Since: 1.0
Author: Paul Klimov ([email protected])
Inheritance: extends yii\web\Controller
ファイルを表示 Open project: yii2tech/admin Class Usage Examples

Public Properties

Property Type Description
$createScenario the scenario used for creating a model.
$modelClass the model class name. This property must be set. The model class must implement [[ActiveRecordInterface]].
$searchModelClass class name of the model which should be used as search model. If not set it will be composed using [[modelClass]].
$updateScenario the scenario used for updating a model.

Public Methods

Method Description
accessRules ( ) : array Returns the access rules for this controller.
actions ( )
behaviors ( )

Method Details

accessRules() public method

This is method is a shortcut, allowing quick adjustment of the [[AccessControl]] filter attached at CrudController::behaviors. Be careful in case you override CrudController::behaviors method, since it may loose configuration provided by this method.
public accessRules ( ) : array
return array list of access rules. See [[AccessControl::rules]] for details about rule specification.

actions() public method

public actions ( )

behaviors() public method

public behaviors ( )

Property Details

$createScenario public_oe property

the scenario used for creating a model.
See also: Model::scenarios()
public $createScenario

$modelClass public_oe property

the model class name. This property must be set. The model class must implement [[ActiveRecordInterface]].
public $modelClass

$searchModelClass public_oe property

class name of the model which should be used as search model. If not set it will be composed using [[modelClass]].
public $searchModelClass

$updateScenario public_oe property

the scenario used for updating a model.
See also: Model::scenarios()
public $updateScenario