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
파일 보기 프로젝트 열기: yii2tech/admin 1 사용 예제들

공개 프로퍼티들

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