PrivilegeGroupPickerTrait
Privilege group picker: moves a privilege into another group without opening the whole group.
Used by the group form (the group header needs no picker for itself) and mainly by the flat
UserRolePrivilegePresenter (reassigns a single privilege to another group).
Follows the pattern of PagePickerTrait.
Table of Contents
Properties
Methods
- privilegeGroupPicker() : PickerConfig
- pickerGroupLangId() : int
- privilegeGroupLabel() : string
- resolvePrivilegeGroupLabel() : string|null
- suggestPrivilegeGroups() : array<int, array{id: int, label: string}>
Properties
$privilegeGroupPickerManager
public
PrivilegeGroupManager
$privilegeGroupPickerManager
Attributes
- #[Inject]
Methods
privilegeGroupPicker()
protected
privilegeGroupPicker(string $formName, string $targetField) : PickerConfig
Parameters
- $formName : string
-
name of the form holding the hidden field
- $targetField : string
-
name of the hidden control (
groupId)
Return values
PickerConfigpickerGroupLangId()
private
pickerGroupLangId() : int
Return values
intprivilegeGroupLabel()
private
privilegeGroupLabel(PrivilegeGroup $group, int $langId) : string
Parameters
- $group : PrivilegeGroup
- $langId : int
Return values
stringresolvePrivilegeGroupLabel()
private
resolvePrivilegeGroupLabel(int $id) : string|null
Parameters
- $id : int
Return values
string|nullsuggestPrivilegeGroups()
private
suggestPrivilegeGroups(string $query) : array<int, array{id: int, label: string}>
Parameters
- $query : string