TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Fluid\ViewHelpers\Be\Security\IfAuthenticatedViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\ViewHelpers\Be\Security\IfAuthenticatedViewHelper:
TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper TYPO3\CMS\Fluid\Core\ViewHelper\Facets\ChildNodeAccessInterface TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface Tx_Fluid_ViewHelpers_Be_Security_IfAuthenticatedViewHelper

Public Member Functions

 render ()
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper
 setChildNodes (array $childNodes)
 
 __construct ()
 
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 setArguments (array $arguments)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectReflectionService (\TYPO3\CMS\Extbase\Reflection\ReflectionService $reflectionService)
 
 isEscapingInterceptorEnabled ()
 
 setViewHelperNode (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $node)
 
 setRenderChildrenClosure (\Closure $renderChildrenClosure)
 
 initializeArgumentsAndRender ()
 
 initialize ()
 
 renderChildren ()
 
 prepareArguments ()
 
 validateArguments ()
 
 initializeArguments ()
 
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode, \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode, \TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
 resetState ()
 

Additional Inherited Members

- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\Facets\CompilableInterface
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper
 renderThenChild ()
 
 renderElseChild ()
 
- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 registerArgument ($name, $type, $description, $required=FALSE, $defaultValue=NULL)
 
 overrideArgument ($name, $type, $description, $required=FALSE, $defaultValue=NULL)
 
 callRenderMethod ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = NULL
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = TRUE
 

Detailed Description

This view helper implements an ifAuthenticated/else condition for BE users/groups.

= Examples =

<f:be.security.ifAuthenticated> This is being shown whenever a BE user is logged in </f:be.security.ifAuthenticated> <output> Everything inside the <f:be.ifAuthenticated> tag is being displayed if you are authenticated with any BE user account. </output>

<f:be.security.ifAuthenticated> <f:then> This is being shown in case you have access. </f:then> <f:else> This is being displayed in case you do not have access. </f:else> </f:be.security.ifAuthenticated> <output> Everything inside the "then" tag is displayed if you have access. Otherwise, everything inside the "else"-tag is displayed. </output>

Definition at line 54 of file IfAuthenticatedViewHelper.php.

Member Function Documentation

◆ render()

TYPO3\CMS\Fluid\ViewHelpers\Be\Security\IfAuthenticatedViewHelper::render ( )

Renders <f:then> child if any BE user is currently authenticated, otherwise renders <f:else> child.

Returns
string the rendered string

Definition at line 62 of file IfAuthenticatedViewHelper.php.

References $GLOBALS, TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper\renderElseChild(), and TYPO3\CMS\Fluid\Core\ViewHelper\AbstractConditionViewHelper\renderThenChild().