AlligatorRoleExtension
class AlligatorRoleExtension extends Twig_Extension
Class AlligatorRoleExtension is injected as twig.extension.alligator.role service. AlligatorRoleExtension handles the logic and provides necessary data for managed entity in twig.
Constants
| ROLE_ROUTE_PERMISSIONS_REDIS_KEY |
|
Properties
| protected mixed | $redisCache | ||
| protected RouterInterface | $router | ||
| protected array|null | $cachedPermissions | ||
| protected TokenStorageInterface | $tokenStorage | ||
| protected array | $userRoles | ||
| protected RoleManager | $roleManager | ||
| protected string | $allRoutes |
Methods
AlligatorRoleExtension constructor.
{@inheritdoc}
No description
Check if logged user can access provided route
No description
No description
Check if there are permissions on product to see quantity light
Check if there are permissions on product to see quantity
Check if there is provided permission on user or product
Retrieve all roles
Returns the name of the extension.
Check for special product permissions
No description
Details
at line 72
__construct(mixed $redisCache, RouterInterface $router, TokenStorageInterface $tokenStorage, RoleManager $roleManager)
AlligatorRoleExtension constructor.
at line 83
getFunctions()
{@inheritdoc}
at line 103
bool
isAllowedAccessToSubRoutes(array $routes)
at line 121
bool
isAllowedAccess(string $routeName, array $params = [])
Check if logged user can access provided route
at line 169
string
getAllRoutesForBackend()
at line 185
bool
checkRolePermissions(mixed $permission, mixed $role)
at line 196
bool
canSeeQuantityLight(array|string $productPermissions)
Check if there are permissions on product to see quantity light
at line 207
bool
canSeeQuantity(array|string $productPermissions)
Check if there are permissions on product to see quantity
at line 219
bool
checkUserAndProductPermissions(string $permission, array|string $productPermissions)
Check if there is provided permission on user or product
at line 237
array
getAllRoles()
Retrieve all roles
at line 247
string
getName()
Returns the name of the extension.
at line 259
mixed
checkAdditionalProductPermission(array|string $productPermissions, mixed $param)
Check for special product permissions