PHP Класс yii2tech\admin\actions\Create

С версии: 1.0
Автор: Paul Klimov ([email protected])
Наследование: extends Action
Показать файл Открыть проект

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

Свойство Тип Описание
$loadDefaultValues provides control for model default values populating. If set to false - no default value population will be performed. If set to true - it will invoke loadDefaultValues() method on model. You can set this as a callable of following signature: php function ($model) { populate default values. }
$newModel a PHP callable that will be called to create the new model. If not set, Create::newModel will be used instead. The signature of the callable should be: php function ($action) { $action is the action object currently running } The callable should return the new model instance.
$view name of the view, which should be rendered

Открытые методы

Метод Описание
newModel ( ) : yii\db\ActiveRecordInterface | Model Creates new model instance.
run ( ) : mixed Creates new record.

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

Метод Описание
loadModelDefaultValues ( Model $model ) Populates given model with the default values.

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

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

Populates given model with the default values.
protected loadModelDefaultValues ( Model $model )
$model yii\base\Model model to be processed.

newModel() публичный Метод

Creates new model instance.
public newModel ( ) : yii\db\ActiveRecordInterface | Model
Результат yii\db\ActiveRecordInterface | yii\base\Model new model instance.

run() публичный Метод

Creates new record.
public run ( ) : mixed
Результат mixed response

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

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

provides control for model default values populating. If set to false - no default value population will be performed. If set to true - it will invoke loadDefaultValues() method on model. You can set this as a callable of following signature: php function ($model) { populate default values. }
public $loadDefaultValues

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

a PHP callable that will be called to create the new model. If not set, Create::newModel will be used instead. The signature of the callable should be: php function ($action) { $action is the action object currently running } The callable should return the new model instance.
public $newModel

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

name of the view, which should be rendered
public $view