PHP Class Neos\FluidAdaptor\ViewHelpers\Security\IfHasRoleViewHelper

= Examples = This is being shown in case you have the Administrator role (aka role) defined in the current package according to the controllerContext This is being shown in case you have the Acme.MyPackage:Administrator role (aka role). This is being shown in case you have the Acme.MyPackage:Administrator role (aka role). Everything inside the tag is being displayed if you have the given role. This is being shown in case you have the role. This is being displayed in case you do not have the role. Everything inside the "then" tag is displayed if you have the role. Otherwise, everything inside the "else"-tag is displayed. This is being shown in case you have the specified role This is being shown in case "otherAccount" has the Acme.MyPackage:Administrator role (aka role).
Inheritance: extends Neos\FluidAdaptor\Core\ViewHelper\AbstractConditionViewHelper
Show file Open project: neos/flow-development-collection Class Usage Examples

Public Methods

Method Description
initializeArguments ( ) Initializes the "then" and "else" arguments
render ( ) : string renders child if the role could be found in the security context, otherwise renders child.

Protected Methods

Method Description
evaluateCondition ( null $arguments = null, TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext ) : boolean

Method Details

evaluateCondition() protected static method

protected static evaluateCondition ( null $arguments = null, TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $renderingContext ) : boolean
$arguments null
$renderingContext TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface
return boolean

initializeArguments() public method

Initializes the "then" and "else" arguments
public initializeArguments ( )

render() public method

renders child if the role could be found in the security context, otherwise renders child.
public render ( ) : string
return string the rendered string