RoleManager
class RoleManager implements BasicEntityManagerInterface
Class RoleManager is injected as alligator.role.manager service. RoleManager handles the logic for entity.
Constants
| ROLE_ROUTE_PERMISSIONS_REDIS_KEY |
Caching key |
Properties
| protected RoleRepository | $repository | ||
| protected RoleEventContainer | $eventContainer |
Methods
Get tree of roles
Get formatted tree
Delete single role by id
Get all groups
Get multiple roles from database
Get array of all roles
Edit permissions for roles
Get lis of all available routes
Get cache
Get cached route param values. If there are no routes cached cache them
Set route permissions to cache
Convert array of routes to html content
Dispatch event for caching
Check if specified role has permission
Dispatch event for special product permissions Example: event to check permissions for product flags on motobike
No description
No description
No description
Details
at line 45
__construct(RoleRepository $repository, RoleEventContainer $eventContainer)
at line 57
string
getRoleTree(array $options = array())
Get tree of roles
at line 66
mixed
getAllTreeRolesForRoleAddTree()
Get formatted tree
at line 91
mixed
saveRole(Role $newRole)
Persist Role
at line 111
bool
deleteRole(int $roleId)
Delete single role by id
at line 147
array
getAllGroups()
Get all groups
at line 158
array
getRolesFromArray(array $roles)
Get multiple roles from database
at line 167
array
getAllRolesIdAndName()
Get array of all roles
at line 178
bool
editRoutePermissions(array $roles)
Edit permissions for roles
at line 203
array
getAllRoutes()
Get lis of all available routes
at line 215
Client
getCache()
Get cache
at line 224
array
getRoutePermissionsFromCache()
Get cached route param values. If there are no routes cached cache them
at line 240
array
saveRoutePermissionsToCache(array $roles)
Set route permissions to cache
at line 270
string
generateAllRoutesHTML()
Convert array of routes to html content
at line 279
RoleEvent|Event
dispatchReCacheRolePermission()
Dispatch event for caching
at line 291
bool
checkRolePermissions(mixed $permission, mixed $role)
Check if specified role has permission
at line 305
mixed
dispatchAdditionalProductPermission(mixed $permission, mixed $param)
Dispatch event for special product permissions Example: event to check permissions for product flags on motobike