CoolCMS API

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

$privilegeGroupPickerManager  : PrivilegeGroupManager

Methods

privilegeGroupPicker()  : PickerConfig
pickerGroupLangId()  : int
privilegeGroupLabel()  : string
resolvePrivilegeGroupLabel()  : string|null
suggestPrivilegeGroups()  : array<int, array{id: int, label: string}>

Properties

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
PickerConfig

resolvePrivilegeGroupLabel()

private resolvePrivilegeGroupLabel(int $id) : string|null
Parameters
$id : int
Return values
string|null

suggestPrivilegeGroups()

private suggestPrivilegeGroups(string $query) : array<int, array{id: int, label: string}>
Parameters
$query : string
Return values
array<int, array{id: int, label: string}>
On this page

Search results