Class dmstr\modules\widgets\controllers\crud\WidgetController
Inheritance | dmstr\modules\widgets\controllers\crud\WidgetController » yii\web\Controller |
---|
WidgetController implements the CRUD actions for Widget model.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$enableCsrfValidation | boolean | Whether to enable CSRF validation for the actions in this controller. | dmstr\modules\widgets\controllers\crud\WidgetController |
Public Methods
Method | Description | Defined 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
Method | Description | Defined By |
---|---|---|
findModel() | Finds the Widget model based on its primary key value. | dmstr\modules\widgets\controllers\crud\WidgetController |
Property Details
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
Creates a new Widget model.
If creation is successful, the browser will be redirected to the 'view' page.
public mixed actionCreate ( ) |
Deletes an existing Widget model.
If deletion is successful, the browser will be redirected to the 'index' page.
public mixed actionDelete ( $id ) | ||
$id | integer |
Lists all Widget models.
public mixed actionIndex ( ) |
Updates an existing Widget model.
If update is successful, the browser will be redirected to the 'view' page.
public mixed actionUpdate ( $id ) | ||
$id | integer |
Displays a single Widget model.
public mixed actionView ( $id ) | ||
$id | integer |
Restrict access permissions to admin user and users with auth-item 'module-controller'
public void behaviors ( ) |
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 |