class RoleHierarchy implements RoleHierarchyInterface

RoleHierarchy defines a role hierarchy.

Properties

protected $map

Methods

__construct(array $hierarchy)

No description

getReachableRoles(array $roles)

Returns an array of all reachable roles by the given ones.

buildRoleMap()

No description

Details

at line 27
__construct(array $hierarchy)

Parameters

array $hierarchy An array defining the hierarchy

at line 37
RoleInterface[] getReachableRoles(array $roles)

Returns an array of all reachable roles by the given ones.

Reachable roles are the roles directly assigned but also all roles that are transitively reachable from them in the role hierarchy.

Parameters

array $roles An array of directly assigned roles

Return Value

RoleInterface[] An array of all reachable roles

at line 53
protected buildRoleMap()