VuFind API Documentation

DynamicRoleProvider
in package
implements RoleProviderInterface

VuFind dynamic role provider.

Tags
category

VuFind

author

Demian Katz demian.katz@villanova.edu

license

http://opensource.org/licenses/gpl-2.0.php GNU General Public License

link

Main Page

Interfaces, Classes, Traits and Enums

RoleProviderInterface

Table of Contents

$config  : array<string|int, mixed>
Configuration for determining permissions.
$manager  : PermissionProviderPluginManager
Permission provider manager
$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

Configuration for determining permissions.

protected array<string|int, mixed> $config

$manager

Permission provider manager

protected PermissionProviderPluginManager $manager

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
Return values
void

Search results