PHP 트레잇 yii2tech\admin\actions\ModelFormTrait

This trait should be used inside the descendant of Action class.
부터: 1.0
저자: Paul Klimov ([email protected])
파일 보기 프로젝트 열기: yii2tech/admin

공개 프로퍼티들

프로퍼티 타입 설명
$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