Class dmstr\modules\widgets\controllers\crud\WidgetController

Inheritancedmstr\modules\widgets\controllers\crud\WidgetController » yii\web\Controller

WidgetController implements the CRUD actions for Widget model.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$enableCsrfValidation boolean Whether to enable CSRF validation for the actions in this controller. dmstr\modules\widgets\controllers\crud\WidgetController

Public Methods

Hide inherited methods

MethodDescriptionDefined By
actionCreate() Creates a new Widget model. dmstr\modules\widgets\controllers\crud\WidgetController
actionDelete() Deletes an existing Widget model. dmstr\modules\widgets\controllers\crud\WidgetController
actionIndex() Lists all Widget models. dmstr\modules\widgets\controllers\crud\WidgetController
actionUpdate() Updates an existing Widget model. dmstr\modules\widgets\controllers\crud\WidgetController
actionView() Displays a single Widget model. dmstr\modules\widgets\controllers\crud\WidgetController
behaviors() Restrict access permissions to admin user and users with auth-item 'module-controller' dmstr\modules\widgets\controllers\crud\WidgetController

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
findModel() Finds the Widget model based on its primary key value. dmstr\modules\widgets\controllers\crud\WidgetController

Property Details

$enableCsrfValidation public property

Whether to enable CSRF validation for the actions in this controller. CSRF validation is enabled only when both this property and \dmstr\modules\widgets\controllers\crud\Request::enableCsrfValidation are true.

Method Details

actionCreate() public method

Creates a new Widget model.

If creation is successful, the browser will be redirected to the 'view' page.

public mixed actionCreate ( )
actionDelete() public method

Deletes an existing Widget model.

If deletion is successful, the browser will be redirected to the 'index' page.

public mixed actionDelete ( $id )
$id integer
actionIndex() public method

Lists all Widget models.

public mixed actionIndex ( )
actionUpdate() public method

Updates an existing Widget model.

If update is successful, the browser will be redirected to the 'view' page.

public mixed actionUpdate ( $id )
$id integer
actionView() public method

Displays a single Widget model.

public mixed actionView ( $id )
$id integer
behaviors() public method

Restrict access permissions to admin user and users with auth-item 'module-controller'

public void behaviors ( )
findModel() protected method

Finds the Widget model based on its primary key value.

If the model is not found, a 404 HTTP exception will be thrown.

protected dmstr\modules\widgets\models\Widget findModel ( $id )
$id integer
return dmstr\modules\widgets\models\Widget

The loaded model

throws \yii\web\HttpException

if the model cannot be found