PHP Класс yii2tech\admin\behaviors\action\VariationBehavior

This behavior should be attached to Action instance. This behavior relies on events triggered by ModelFormTrait.
См. также: https://github.com/yii2tech/ar-variation
См. также: yii2tech\admin\actions\ModelFormTrait
С версии: 1.0
Автор: Paul Klimov ([email protected])
Наследование: extends yii\base\Behavior
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$variationNames list of model variation behavior names, which should be affected by the action. If empty - all instances of [[\yii2tech\ar\variation\VariationBehavior]] will be picked up.

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

Метод Описание
afterDataLoad ( ActionEvent $event ) Handles afterDataLoad event.
events ( )

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

Метод Описание
afterAjaxValidate ( ActionEvent $event ) Handles afterAjaxValidate event.
findVariationModelBatches ( Model | yii\db\ActiveRecordInterface $model ) : array
getVariationModelBatches ( Model | yii\db\ActiveRecordInterface $model ) : array Get variation models for the main one in batches.

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

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

Performs AJAX validation of the variation models via [[ActiveForm::validate()]].
protected afterAjaxValidate ( ActionEvent $event )
$event yii2tech\admin\ActionEvent event instance.

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

Populates the variation models with input data.
public afterDataLoad ( ActionEvent $event )
$event yii2tech\admin\ActionEvent event instance.

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

public events ( )

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

protected findVariationModelBatches ( Model | yii\db\ActiveRecordInterface $model ) : array
$model yii\base\Model | yii\db\ActiveRecordInterface
Результат array list of variation models in format: behaviorName => Model[]

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

Get variation models for the main one in batches.
protected getVariationModelBatches ( Model | yii\db\ActiveRecordInterface $model ) : array
$model yii\base\Model | yii\db\ActiveRecordInterface main model instance.
Результат array list of variation models in format: behaviorName => Model[]

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

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

list of model variation behavior names, which should be affected by the action. If empty - all instances of [[\yii2tech\ar\variation\VariationBehavior]] will be picked up.
public $variationNames