PHP Трейт yii2tech\admin\actions\ModelFormTrait

This trait should be used inside the descendant of Action class.
С версии: 1.0
Автор: Paul Klimov ([email protected])
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$flash flash message to be set on success.
$scenario the scenario to be assigned to the new model before it is validated and saved.

Защищенные методы

Метод Описание
load ( Model $model, array $data ) : boolean Populates the model with input data.
performAjaxValidation ( Model $model ) : array Performs AJAX validation of the model via [[ActiveForm::validate()]].

Описание методов

load() защищенный Метод

Populates the model with input data.
protected load ( Model $model, array $data ) : boolean
$model yii\base\Model model instance.
$data array the data array to load, typically `$_POST` or `$_GET`.
Результат boolean whether expected forms are found in `$data`.

performAjaxValidation() защищенный Метод

Performs AJAX validation of the model via [[ActiveForm::validate()]].
protected performAjaxValidation ( Model $model ) : array
$model yii\base\Model main model.
Результат array the error message array indexed by the attribute IDs.

Описание свойств

$flash публичное свойство

flash message to be set on success.
См. также: Action::setFlash() for details on how setup flash.
public $flash

$scenario публичное свойство

the scenario to be assigned to the new model before it is validated and saved.
public $scenario