Class pheme\grid\actions\ToggleAction

Inheritancepheme\grid\actions\ToggleAction » yii\base\Action

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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|\yii\db\Expression What to set active models to pheme\grid\actions\ToggleAction
$primaryKey string Pk field name pheme\grid\actions\ToggleAction
$redirect string|array URL to redirect to pheme\grid\actions\ToggleAction
$scenario string Scenario model pheme\grid\actions\ToggleAction
$setFlash bool Whether to set flash messages or not pheme\grid\actions\ToggleAction

Public Methods

Hide inherited methods

MethodDescriptionDefined By
run() Run the action pheme\grid\actions\ToggleAction

Property Details

$andWhere public property

Additional condition for loading the model

public string|array $andWhere null
$attribute public property

Model attribute

public string $attribute 'active'
$flashError public property

Flash message on error

public string $flashError "Error saving Model"
$flashSuccess public property

Flash message on success

public string $flashSuccess "Model saved"
$modelClass public property

Name of the model

public string $modelClass null
$offValue public property

What to set inactive models to

public string|int|boolean $offValue 0
$onValue public property

What to set active models to

public string|int|boolean|\yii\db\Expression $onValue 1
$primaryKey public property

Pk field name

public string $primaryKey 'id'
$redirect public property

URL to redirect to

public string|array $redirect null
$scenario public property

Scenario model

public string $scenario null
$setFlash public property

Whether to set flash messages or not

public bool $setFlash false

Method Details

run() public method

Run the action

public mixed run ( $id )
$id

Integer id of model to be loaded

throws \yii\web\MethodNotAllowedHttpException
throws \yii\base\InvalidConfigException