RolePermissionsExtension
class RolePermissionsExtension extends Twig_Extension
Class RolePermissionsExtension is injected as user_plugin.role_permissions.twig_extension service. RolePermissionsExtension handles the logic and provides necessary data for managed entity in twig.
Properties
| protected RolePermissionsManager | $manager |
Methods
getFunctions()
{@inheritdoc}
array
getRolePermissions()
No description
array
getProductRolePermissions()
No description
bool
checkUserAddToCartPermission()
Check if user has permission to add to cart
bool
checkProductAddToCartPermission(array|string $permissions)
Check if user or product have add to cart permission
string
getName()
Returns the name of the extension.
Details
at line 28
__construct(RolePermissionsManager $manager)
RolePermissionsExtension constructor.
at line 36
getFunctions()
{@inheritdoc}
at line 49
array
getRolePermissions()
at line 57
array
getProductRolePermissions()
at line 66
bool
checkUserAddToCartPermission()
Check if user has permission to add to cart
at line 77
bool
checkProductAddToCartPermission(array|string $permissions)
Check if user or product have add to cart permission
at line 87
string
getName()
Returns the name of the extension.