Class \Prado\Security\Permissions\TPermissionEvent
TPermissionEvent class
TPermissionEvent links a permission to dynamic events to check permission. This class acts as a data container object for the Permission, Description, and module preset rules. Preset Rules can be turned off from the TPermissionManager with setting setAutoPresetRules to false. This class works with TPermissionsBehavior to register the Permission, Description, and Preset Rules and also to link the dynamic events to check user permission.
Class hierarchy
Author: Brad Anderson <belisoful@icloud.com>Since: 4.2.0
public
|
__construct([string $permissionName = '' ][, string $description = '' ][, string|array<string|int, string> $events = [] ][, null|array<string|int, TAuthorizationRule> $rules = null ]) : mixed
Constructs the class. All permission names are made lower case.
|
public
|
|
public
|
|
public
|
|
public
|
getRules() : array<string|int, TAuthorizationRule>
these are the preset rules for when registering the permission name.
|
public
|
|
public
|
setEvents(null|string|array<string|int, string> $events) : mixed
this will take an array of string dynamic events, or a ',' comma separated
list of dynamic events
|
public
|
|
public
|
setRules(null|TAuthorizationRule|array<string|int, TAuthorizationRule> $rules) : mixed
these are the preset rules for when registering the permission name.
|
\Prado\TComponent::GLOBAL_RAISE_EVENT_LISTENER |