RolesTrait
Roles trait.
Table of Contents
Properties
- $selectedRoles : array<string|int, mixed>
Methods
- getRoleUrlsMethods() : array<string|int, mixed>
- Get role URLs and methods about role pages.
- isRestrictedPriority() : bool
- Check if the data that will be update or delete is in restricted priority.
Properties
$selectedRoles
protected
array<string|int, mixed>
$selectedRoles
= []
Selected roles. This property can access after called to isRestrictedPriority()
method. It can be use to loop each row immediately.
Methods
getRoleUrlsMethods()
Get role URLs and methods about role pages.
protected
getRoleUrlsMethods([string $userrole_id = '' ]) : array<string|int, mixed>
Parameters
- $userrole_id : string = ''
-
The role ID.
Return values
array<string|int, mixed> —Return associative array.
isRestrictedPriority()
Check if the data that will be update or delete is in restricted priority.
protected
isRestrictedPriority(array<string|int, mixed> $userrole_ids) : bool
Parameters
- $userrole_ids : array<string|int, mixed>
-
The list of user role IDs. This can be array of IDs that was re-ordered.
Return values
bool —Return true
if yes (cannot update), false
if not (can update).