RestrictionSet
in package
Defines a set of restrictions or rights to access pages and specific actions on pages. The $type 'allow-all' or 'deny-all' defines its behavior. A RestrictionSet belongs to a User.
Table of Contents
- ALLOWED_TYPES = ['allow-all', 'deny-all']
- $entries : mixed
- $type : mixed
- __construct() : mixed
- Creates new set of restrictions (permissions).
- hasAccessTo() : mixed
- Checks if this permission set has access to a specific page/action
Constants
ALLOWED_TYPES
public
mixed
ALLOWED_TYPES
= ['allow-all', 'deny-all']
Tags
Properties
$entries
private
mixed
$entries
= []
Tags
$type
private
mixed
$type
= 'allow-all'
Tags
Methods
__construct()
Creates new set of restrictions (permissions).
public
__construct(string $type[, array<string|int, RestrictionSetEntry> $entries = [] ]) : mixed
Parameters
- $type : string
-
'allow-all' = allow everything except the entries you define, 'deny-all' = deny everything except the entries you define
- $entries : array<string|int, RestrictionSetEntry> = []
-
Array of entires
Return values
mixed —hasAccessTo()
Checks if this permission set has access to a specific page/action
public
hasAccessTo(string $action, string $pageId) : mixed
Parameters
- $action : string
- $pageId : string