RoleManager uses TranslateTrait
Table of Contents
Methods
- __construct() : mixed
- addFavoriteRole() : void
- Add role to favorite role table.
- addRecentRole() : void
- Save role code to recent role table.
- getCustomRoles() : array<string|int, mixed>
- Get list of custom roles for current user
- getFavoriteRoles() : array<string|int, mixed>
- Return list of favorite roles.
- getIndustriesWithRoles() : array<string|int, mixed>
- Returns roles list by industry.
- getLibrarySystemRoleCode() : string
- Return system role preprompt code
- getPromptsBy() : array<string|int, PromptDto>
- Get list prompts by category and roleCode
- getRecentRoles() : array<string|int, mixed>
- Get list of recent used roles
- getRecommendedRoles() : array<string|int, mixed>
- Get list of recommended roles
- getRoleByCode() : array<string|int, mixed>|null
- Get exists role by code
- getRoleByCodeOrUniversalRole() : array<string|int, mixed>|null
- Returned role by role code or universal role
- getRolesByCode() : array<string|int, mixed>
- Get exists roles list by code
- getUniversalRole() : array<string|int, mixed>|null
- Return universal role
- getUniversalRoleCode() : string
- Return universal role code for default
- removeFavoriteRole() : void
- Remove role code from favorite role table.
Methods
__construct()
public
__construct(int $userId, string $language) : mixed
Parameters
- $userId : int
- $language : string
addFavoriteRole()
Add role to favorite role table.
public
addFavoriteRole(Role $role) : void
Parameters
- $role : Role
-
role code.
addRecentRole()
Save role code to recent role table.
public
addRecentRole(Role $role) : void
Parameters
- $role : Role
-
role code.
getCustomRoles()
Get list of custom roles for current user
public
getCustomRoles() : array<string|int, mixed>
Return values
array<string|int, mixed>getFavoriteRoles()
Return list of favorite roles.
public
getFavoriteRoles() : array<string|int, mixed>
Return values
array<string|int, mixed>getIndustriesWithRoles()
Returns roles list by industry.
public
getIndustriesWithRoles() : array<string|int, mixed>
Return values
array<string|int, mixed>getLibrarySystemRoleCode()
Return system role preprompt code
public
static getLibrarySystemRoleCode() : string
Return values
stringgetPromptsBy()
Get list prompts by category and roleCode
public
getPromptsBy(string $category, string $roleCode) : array<string|int, PromptDto>
Parameters
- $category : string
- $roleCode : string
Return values
array<string|int, PromptDto>getRecentRoles()
Get list of recent used roles
public
getRecentRoles() : array<string|int, mixed>
Return values
array<string|int, mixed>getRecommendedRoles()
Get list of recommended roles
public
getRecommendedRoles([int $limit = 10 ]) : array<string|int, mixed>
Parameters
- $limit : int = 10
Return values
array<string|int, mixed>getRoleByCode()
Get exists role by code
public
getRoleByCode(string $roleCode) : array<string|int, mixed>|null
Parameters
- $roleCode : string
Return values
array<string|int, mixed>|nullgetRoleByCodeOrUniversalRole()
Returned role by role code or universal role
public
getRoleByCodeOrUniversalRole(string $roleCode) : array<string|int, mixed>|null
Parameters
- $roleCode : string
Return values
array<string|int, mixed>|nullgetRolesByCode()
Get exists roles list by code
public
getRolesByCode(array<string|int, string> $roleCodes) : array<string|int, mixed>
Parameters
- $roleCodes : array<string|int, string>
Return values
array<string|int, mixed>getUniversalRole()
Return universal role
public
getUniversalRole() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|nullgetUniversalRoleCode()
Return universal role code for default
public
static getUniversalRoleCode() : string
Return values
stringremoveFavoriteRole()
Remove role code from favorite role table.
public
removeFavoriteRole(Role $role) : void
Parameters
- $role : Role
-
role code.