ServiceRoles
Trait extras
Extend the object to support additional extras stored next to it as a folder
Table of Contents
- LinkedUserAccounts() : array<string|int, mixed>|null
- Get list of assigned/responsible users
- LinkUserAccount() : mixed
- Add user with role to this entity
- UpdateAttributeServiceroles() : Result
- Callback on update validate service roles
Methods
LinkedUserAccounts()
Get list of assigned/responsible users
public
LinkedUserAccounts([array<string|int, mixed>|null $types = null ]) : array<string|int, mixed>|null
Parameters
- $types : array<string|int, mixed>|null = null
-
Roles to filter for
Return values
array<string|int, mixed>|null —LinkUserAccount()
Add user with role to this entity
public
LinkUserAccount(string $user_id, string $role) : mixed
Parameters
- $user_id : string
- $role : string
Return values
mixed —UpdateAttributeServiceroles()
Callback on update validate service roles
public
UpdateAttributeServiceroles(object $attr, array<string|int, mixed> $data) : Result
This function is called when the primary identifier is changed, is called from objecthandler->updateentity
Parameters
- $attr : object
-
The changed attribute
- $data : array<string|int, mixed>
-
The new attribute value
Return values
Result —A system result object