DynamicRoleProvider
in package
implements
RoleProviderInterface
VuFind dynamic role provider.
Tags
Interfaces, Classes, Traits and Enums
- RoleProviderInterface
Table of Contents
- $config : array<string|int, mixed>
- $manager : PluginManager
- $roles : array<string|int, mixed>
- Cache of role objects.
- __construct() : mixed
- Constructor
- getRoles() : array<string|int, RoleInterface>
- Get the roles from the provider
- getPermissionsArray() : array<string|int, mixed>
- Get an associative array of role name => permissions using the provided configuration.
- getRole() : Role
- Get a role object by name.
- getRolesForSettings() : array<string|int, mixed>
- Given a settings array, return the appropriate roles.
- populateRoles() : void
- Populate the internal role array.
Properties
$config
protected
array<string|int, mixed>
$config
$manager
protected
PluginManager
$manager
$roles
Cache of role objects.
protected
array<string|int, mixed>
$roles
= false
Methods
__construct()
Constructor
public
__construct(PluginManager $manager, array<string|int, mixed> $config) : mixed
Parameters
- $manager : PluginManager
-
Permission provider manager
- $config : array<string|int, mixed>
-
Configuration for determining permissions
Return values
mixed —getRoles()
Get the roles from the provider
public
getRoles(array<string|int, string> $roleNames) : array<string|int, RoleInterface>
Parameters
- $roleNames : array<string|int, string>
-
Role(s) to look up.
Return values
array<string|int, RoleInterface> —getPermissionsArray()
Get an associative array of role name => permissions using the provided configuration.
protected
getPermissionsArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —getRole()
Get a role object by name.
protected
getRole(string $name) : Role
Parameters
- $name : string
-
Role name
Return values
Role —getRolesForSettings()
Given a settings array, return the appropriate roles.
protected
getRolesForSettings(array<string|int, mixed> $settings) : array<string|int, mixed>
Parameters
- $settings : array<string|int, mixed>
-
Settings for finding roles that allow a permission
Return values
array<string|int, mixed> —populateRoles()
Populate the internal role array.
protected
populateRoles() : void