IfAuthenticatedViewHelper extends AbstractConditionViewHelper

This ViewHelper implements an ifAuthenticated/else condition for frontend users.

Examples

Basic usage

::

<f:security.ifAuthenticated> This is being shown whenever a FE user is logged in </f:security.ifAuthenticated>

Everything inside the :html:<f:security.ifAuthenticated> tag is being displayed if current frontend user is authenticated.

IfAuthenticated / then / else

::

<f: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:security.ifAuthenticated>

Everything inside the :html:<f:then></f:then> tag is displayed if frontend user is authenticated. Otherwise, everything inside the :html:<f:else></f:else> tag is displayed.

Table of Contents

Methods

evaluateCondition()  : bool
This method decides if the condition is TRUE or FALSE. It can be overridden in extending viewhelpers to adjust functionality.

Methods

evaluateCondition()

This method decides if the condition is TRUE or FALSE. It can be overridden in extending viewhelpers to adjust functionality.

protected static evaluateCondition([array<string|int, mixed> $arguments = null ]) : bool
Parameters
$arguments : array<string|int, mixed> = null

ViewHelper arguments to evaluate the condition for this ViewHelper, allows for flexibility in overriding this method.

Return values
bool

        
On this page

Search results