Class pheme\grid\actions\ToggleAction
Inheritance | pheme\grid\actions\ToggleAction » yii\base\Action |
---|
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$andWhere | string|array | Additional condition for loading the model | pheme\grid\actions\ToggleAction |
$attribute | string | Model attribute | pheme\grid\actions\ToggleAction |
$flashError | string | Flash message on error | pheme\grid\actions\ToggleAction |
$flashSuccess | string | Flash message on success | pheme\grid\actions\ToggleAction |
$modelClass | string | Name of the model | pheme\grid\actions\ToggleAction |
$offValue | string|int|boolean | What to set inactive models to | pheme\grid\actions\ToggleAction |
$onValue | string|int|boolean | What to set active models to | pheme\grid\actions\ToggleAction |
$redirect | string|array | URL to redirect to | pheme\grid\actions\ToggleAction |
$setFlash | bool | Whether to set flash messages or not | pheme\grid\actions\ToggleAction |
Public Methods
Method | Description | Defined By |
---|---|---|
run() | Run the action | pheme\grid\actions\ToggleAction |
Property Details
Additional condition for loading the model
Model attribute
Flash message on error
Flash message on success
Name of the model
What to set inactive models to
What to set active models to
URL to redirect to
Whether to set flash messages or not
Method Details
Run the action
public mixed run ( $id ) | ||
$id | Integer id of model to be loaded |
|
throws | \yii\web\MethodNotAllowedHttpException | |
---|---|---|
throws | \yii\base\InvalidConfigException |