PermissionTwigExtension
final class PermissionTwigExtension extends AbstractExtension (View source)
Twig function can() that asks the injected permission checker whether the current user holds a permission.
Methods
__construct(callable $permissionChecker)
No description
array
getFunctions()
No description
bool
can(string $permission)
Whether the current user holds the given permission; false when unauthenticated.
Details
__construct(callable $permissionChecker)
No description
array
getFunctions()
No description
bool
can(string $permission)
Whether the current user holds the given permission; false when unauthenticated.