TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode Class Reference
Inheritance diagram for TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode:
TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Fixtures\ConstraintSyntaxTreeNode TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\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 TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\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 TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\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\Parser\SyntaxTree\ViewHelperNode::__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 TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode\$arguments, and TYPO3\CMS\Core\Utility\GeneralUtility\makeInstance().

Member Function Documentation

◆ __sleep()

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::__sleep ( )

Clean up for serializing.

Returns
array

Definition at line 142 of file ViewHelperNode.php.

◆ evaluate()

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::evaluate ( \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface  $renderingContext)

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
object evaluated node after the view helper has been called.

Implements TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface.

Definition at line 103 of file ViewHelperNode.php.

References TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode\$uninitializedViewHelper.

◆ getArguments()

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::getArguments ( )

INTERNAL - only needed for compiling templates

Returns
array

Definition at line 86 of file ViewHelperNode.php.

References TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode\$arguments.

◆ getUninitializedViewHelper()

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::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 67 of file ViewHelperNode.php.

References TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode\$uninitializedViewHelper.

◆ getViewHelperClassName()

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::getViewHelperClassName ( )

Get class name of view helper

Returns
string Class Name of associated view helper

Definition at line 76 of file ViewHelperNode.php.

References TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode\$viewHelperClassName.

Member Data Documentation

◆ $arguments

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::$arguments = array()
protected

◆ $uninitializedViewHelper

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::$uninitializedViewHelper = NULL
protected

◆ $viewHelperClassName

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::$viewHelperClassName
protected

◆ $viewHelpersByContext

TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::$viewHelpersByContext = NULL
protected

Definition at line 46 of file ViewHelperNode.php.