PHP Класс Acl\Model\Behavior\AclBehavior

Enables objects to easily tie into an ACL system
Наследование: extends Cake\ORM\Behavior
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_table Table instance
$_typeMaps array Maps ACL type options to ACL models

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

Метод Описание
__construct ( Table $model, array $config = [] ) : void Sets up the configuration for the model, and loads ACL models if they haven't been already
afterDelete ( Cake\Event\Event $event, Cake\ORM\Entity $entity ) : void Destroys the ARO/ACO node bound to the deleted record
afterSave ( Cake\Event\Event $event, Cake\ORM\Entity $entity ) : void Creates a new ARO/ACO node bound to this record
node ( string | array | Model $ref = null, string $type = null ) : Cake\ORM\Query Retrieves the Aro/Aco node for this model

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

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

Sets up the configuration for the model, and loads ACL models if they haven't been already
public __construct ( Table $model, array $config = [] ) : void
$model Cake\ORM\Table Table instance being attached
$config array Configuration
Результат void

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

Destroys the ARO/ACO node bound to the deleted record
public afterDelete ( Cake\Event\Event $event, Cake\ORM\Entity $entity ) : void
$event Cake\Event\Event The afterDelete event that was fired
$entity Cake\ORM\Entity The entity being deleted
Результат void

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

Creates a new ARO/ACO node bound to this record
public afterSave ( Cake\Event\Event $event, Cake\ORM\Entity $entity ) : void
$event Cake\Event\Event The afterSave event that was fired
$entity Cake\ORM\Entity The entity being saved
Результат void

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

Retrieves the Aro/Aco node for this model
public node ( string | array | Model $ref = null, string $type = null ) : Cake\ORM\Query
$ref string | array | Model Array with 'model' and 'foreign_key', model object, or string value
$type string Only needed when Acl is set up as 'both', specify 'Aro' or 'Aco' to get the correct node
Результат Cake\ORM\Query

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

$_table защищенное свойство

Table instance
protected $_table

$_typeMaps защищенное свойство

Maps ACL type options to ACL models
protected array $_typeMaps
Результат array