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

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

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

Свойство Тип Описание
$roleNames list of model role behavior names, which should be affected by the action. If empty - all instances of RoleBehavior will be picked up.

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

Метод Описание
afterAjaxValidate ( ActionEvent $event ) Performs AJAX validation of the role models via [[ActiveForm::validate()]].
afterDataLoad ( ActionEvent $event ) Handles afterDataLoad event.
events ( )
getRoleModels ( Model | yii\db\ActiveRecordInterface $model ) : Model[] Get role models for the main one.

Приватные методы

Метод Описание
findRoleModels ( Model | yii\db\ActiveRecordInterface $model ) : array

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

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

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

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

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

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

public events ( )

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

Get role models for the main one.
public getRoleModels ( Model | yii\db\ActiveRecordInterface $model ) : Model[]
$model yii\base\Model | yii\db\ActiveRecordInterface main model instance.
Результат yii\base\Model[] list of role models

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

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

list of model role behavior names, which should be affected by the action. If empty - all instances of RoleBehavior will be picked up.
public $roleNames