PermissionsViewHelper extends AbstractViewHelper uses CompileWithRenderStatic
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <.typo3.cms.beuser.s.permissions>
Render permission icon group (user / group / others) of the "Access" module.
Most of that could be done in fluid directly, but this ViewHelper is much better performance wise.
Table of Contents
Constants
- MASKS = [1, 16, 2, 4, 8]
Properties
- $escapeOutput : bool
- As this ViewHelper renders HTML, the output must not be escaped.
- $permissionLabels : array<string|int, mixed>
Methods
- initializeArguments() : mixed
- Initializes the arguments
- renderStatic() : string
- Return permissions.
- resolvePermissionLabel() : string
Constants
MASKS
protected
mixed
MASKS
= [1, 16, 2, 4, 8]
Properties
$escapeOutput
As this ViewHelper renders HTML, the output must not be escaped.
protected
bool
$escapeOutput
= false
$permissionLabels
protected
static array<string|int, mixed>
$permissionLabels
= []
Cached labels for a single permission mask like "Delete page"
Methods
initializeArguments()
Initializes the arguments
public
initializeArguments() : mixed
renderStatic()
Return permissions.
public
static renderStatic(array{permission: int, scope: string, pageId: int} $arguments, Closure $renderChildrenClosure, RenderingContextInterface $renderingContext) : string
Parameters
- $arguments : array{permission: int, scope: string, pageId: int}
- $renderChildrenClosure : Closure
- $renderingContext : RenderingContextInterface
Tags
Return values
stringresolvePermissionLabel()
protected
static resolvePermissionLabel(int $mask) : string
Parameters
- $mask : int