class PermissionTwigExtension extends AbstractExtension (View source)

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

Parameters

callable $permissionChecker

Deferred check for the current user; only invoked when a template calls can().

array getFunctions()

No description

Return Value

array

bool can(string $permission)

Whether the current user holds the given permission; false when unauthenticated.

Parameters

string $permission

Return Value

bool