TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
ViewHelperNode Class Reference
Inheritance diagram for ViewHelperNode:
AbstractNode NodeInterface ConstraintSyntaxTreeNode EmptySyntaxTreeNode

Public Member Functions

 __construct (\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper $viewHelper, array $arguments)
 
 getUninitializedViewHelper ()
 
 getViewHelperClassName ()
 
 getArguments ()
 
 evaluate (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 __sleep ()
 
- Public Member Functions inherited from AbstractNode
 evaluateChildNodes (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 getChildNodes ()
 
 addChildNode (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface $childNode)
 

Protected Attributes

 $viewHelperClassName
 
 $arguments = array()
 
 $uninitializedViewHelper = null
 
 $viewHelpersByContext = null
 
- Protected Attributes inherited from AbstractNode
 $childNodes = array()
 

Detailed Description

Node which will call a ViewHelper associated with this node.

Definition at line 17 of file ViewHelperNode.php.

Constructor & Destructor Documentation

__construct ( \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper  $viewHelper,
array  $arguments 
)

Constructor.

Parameters
\TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper$viewHelperThe view helper
array$argumentsArguments of view helper - each value is a RootNode.

Definition at line 54 of file ViewHelperNode.php.

References ViewHelperNode\$arguments.

Member Function Documentation

__sleep ( )

Clean up for serializing.

Returns
array

Definition at line 147 of file ViewHelperNode.php.

Call the view helper associated with this object.

First, it evaluates the arguments of the view helper.

If the view helper implements , it calls setChildNodes(array childNodes) on the view helper.

Afterwards, checks that the view helper did not leave a variable lying around.

Parameters
\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface$renderingContext
Returns
string evaluated node after the view helper has been called.

Implements NodeInterface.

Definition at line 107 of file ViewHelperNode.php.

References ViewHelperNode\$uninitializedViewHelper.

getArguments ( )

INTERNAL - only needed for compiling templates

Returns
array

Definition at line 89 of file ViewHelperNode.php.

References ViewHelperNode\$arguments.

getUninitializedViewHelper ( )

Returns the attached (but still uninitialized) ViewHelper for this ViewHelperNode. We need this method because sometimes Interceptors need to ask some information from the ViewHelper.

Returns
the attached ViewHelper, if it is initialized

Definition at line 68 of file ViewHelperNode.php.

References ViewHelperNode\$uninitializedViewHelper.

getViewHelperClassName ( )

Get class name of view helper

Returns
string Class Name of associated view helper

Definition at line 78 of file ViewHelperNode.php.

References ViewHelperNode\$viewHelperClassName.

Referenced by AbstractConditionViewHelper\compile(), ActionMenuItemGroupViewHelper\render(), AbstractConditionViewHelper\renderElseChild(), and AbstractConditionViewHelper\renderThenChild().

Member Data Documentation

$arguments = array()
protected

Definition at line 31 of file ViewHelperNode.php.

Referenced by ViewHelperNode\__construct(), and ViewHelperNode\getArguments().

$uninitializedViewHelper = null
protected
$viewHelperClassName
protected

Definition at line 24 of file ViewHelperNode.php.

Referenced by ViewHelperNode\getViewHelperClassName().

$viewHelpersByContext = null
protected

Definition at line 46 of file ViewHelperNode.php.