Definition at line 41 of file role_manager.inc.
◆ addRoleToAccessList()
static RoleManager::addRoleToAccessList |
( |
|
$items, |
|
|
|
$role, |
|
|
|
$field = "role" |
|
) |
| |
|
static |
Adds the specified role to the access list field in each of the supplied DataItems.
- Parameters
-
mixed | $items | the DataItem or array of DataItems to be updated |
string | $role | the role to add to the access list field |
string | $field | the name of the field (default is 'role') |
Definition at line 93 of file role_manager.inc.
95 if (count(
$items) == 0)
return;
98 if (!
$items instanceof DataItem)
return;
104 if (!$item->hasField(
$field))
continue;
120 $oldFilter = $item->filter;
121 $item->filter =
new InclusionFilter(
$field);
124 $item->filter = $oldFilter;
◆ deleteRoleFromString()
static RoleManager::deleteRoleFromString |
( |
& |
$items, |
|
|
|
$del_role, |
|
|
|
$field = "" |
|
) |
| |
|
static |
◆ registerSerializationHandler()
static RoleManager::registerSerializationHandler |
( |
| ) |
|
|
static |
Definition at line 175 of file role_manager.inc.
registerHandler($component, $title, $handler)
Registers a serialization handler for a component.
Provides a simple implementation of a SerializationHandler that can serialize a single DataItem class...
◆ removeRoleFromAccessList()
static RoleManager::removeRoleFromAccessList |
( |
|
$items, |
|
|
|
$role, |
|
|
|
$field = "role" |
|
) |
| |
|
static |
Removes the specified role from the access list field in each of the supplied DataItems.
- Parameters
-
mixed | $items | the DataItem or array of DataItems to be updated |
string | $role | the role to add to the access list field |
string | $field | the name of the field (default is 'role') |
Definition at line 136 of file role_manager.inc.
138 if (count(
$items) == 0)
return;
141 if (!
$items instanceof DataItem)
return;
147 if (!$item->hasField(
$field))
continue;
166 $oldFilter = $item->filter;
167 $item->filter =
new InclusionFilter(
$field);
168 $item->set(
$field, implode(
",", $newRoles));
170 $item->filter = $oldFilter;
◆ RoleManager()
RoleManager::RoleManager |
( |
| ) |
|
◆ upgradeComponent()
static RoleManager::upgradeComponent |
( |
|
$version | ) |
|
|
static |
The documentation for this class was generated from the following file: