PHP 클래스 Acl\Model\Behavior\AclBehavior

Enables objects to easily tie into an ACL system
상속: extends Cake\ORM\Behavior
파일 보기 프로젝트 열기: cakephp/acl

보호된 프로퍼티들

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