TYPO3
7.6
|
Static Protected Member Functions | |
static | evaluateCondition ($arguments=null) |
Static Protected Member Functions inherited from AbstractConditionViewHelper | |
static | renderStaticThenChild ($arguments, &$hasEvaluated) |
static | renderStaticElseChild ($arguments, &$hasEvaluated) |
static | evaluateCondition ($arguments=null) |
Additional Inherited Members | |
Static Public Member Functions inherited from AbstractConditionViewHelper | |
static | renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext) |
Protected Member Functions inherited from AbstractConditionViewHelper | |
renderThenChild () | |
renderElseChild () | |
Protected Attributes inherited from AbstractViewHelper | |
$arguments | |
$templateVariableContainer | |
$controllerContext | |
$renderingContext | |
$renderChildrenClosure = null | |
$viewHelperVariableContainer | |
$objectManager | |
$escapingInterceptorEnabled = true | |
This view helper implements an ifHasRole/else condition for BE users/groups.
= Examples =
<f:be.security.ifHasRole role="Administrator"> This is being shown in case the current BE user belongs to a BE usergroup (aka role) titled "Administrator" (case sensitive) </f:be.security.ifHasRole>
<output> Everything inside the <f:ifHasRole> tag is being displayed if the logged in BE user belongs to the specified role. </output>
<f:be.security.ifHasRole role="1"> This is being shown in case the current BE user belongs to a BE usergroup (aka role) with the uid "1" </f:be.security.ifHasRole>
<output> Everything inside the <f:ifHasRole> tag is being displayed if the logged in BE user belongs to the specified role. </output>
<f:be.security.ifHasRole role="Administrator"> <f:then> This is being shown in case you have the role. </f:then> <f:else> This is being displayed in case you do not have the role. </f:else> </f:be.security.ifHasRole>
<output> Everything inside the "then" tag is displayed if the logged in BE user belongs to the specified role. Otherwise, everything inside the "else"-tag is displayed. </output>
Definition at line 63 of file Be/Security/IfHasRoleViewHelper.php.
|
staticprotected |
This method decides if the condition is TRUE or FALSE. It can be overriden in extending viewhelpers to adjust functionality.
array | $arguments | ViewHelper arguments to evaluate the condition for this ViewHelper, allows for flexiblity in overriding this method. |
Definition at line 83 of file Be/Security/IfHasRoleViewHelper.php.
References AbstractViewHelper\$arguments, and $GLOBALS.
initializeArguments | ( | ) |
Initializes the "role" argument. Renders <f:then> child if the current logged in BE user belongs to the specified role (aka usergroup) otherwise renders <f:else> child.
Definition at line 72 of file Be/Security/IfHasRoleViewHelper.php.
References AbstractViewHelper\registerArgument().