TYPO3  7.6
Public Member Functions | Static Public Member Functions | List of all members
SectionViewHelper Class Reference
Inheritance diagram for SectionViewHelper:
AbstractViewHelper PostParseInterface CompilableInterface

Public Member Functions

 initializeArguments ()
 
 render ()
 
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode,\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode,\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 
- Public Member Functions inherited from 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 ()
 
- Public Member Functions inherited from CompilableInterface
 compile ($argumentsVariableName, $renderChildrenClosureVariableName, &$initializationPhpCode,\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode $syntaxTreeNode,\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler $templateCompiler)
 

Static Public Member Functions

static postParseEvent (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $syntaxTreeNode, array $viewHelperArguments,\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer $variableContainer)
 
- Static Public Member Functions inherited from AbstractViewHelper
static renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Static Public Member Functions inherited from PostParseInterface
static postParseEvent (\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode $syntaxTreeNode, array $viewHelperArguments,\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer $variableContainer)
 
- Static Public Member Functions inherited from CompilableInterface
static renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractViewHelper
 registerArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 overrideArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 callRenderMethod ()
 
 getLogger ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 
- Protected Attributes inherited from AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = null
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = true
 

Detailed Description

A Section view helper

== Examples ==

<f:section name="someSection">This is a section. {foo}</f:section> <f:render section="someSection" arguments="{foo: someVariable}" /> <output> the content of the section "someSection". The content of the variable {someVariable} will be available in the partial as {foo} </output>

<f:section name="mySection">

f:for each="{myMenu}" as="menuItem"> {menuItem.text} <f:if condition="{menuItem.subItems}"> <f:render section="mySection" arguments="{myMenu: menuItem.subItems}" /> </f:if> </f:for> </f:section> <f:render section="mySection" arguments="{myMenu: menu}" /> <output>

Definition at line 56 of file Classes/ViewHelpers/SectionViewHelper.php.

Member Function Documentation

compile (   $argumentsVariableName,
  $renderChildrenClosureVariableName,
$initializationPhpCode,
\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode  $syntaxTreeNode,
\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler  $templateCompiler 
)

The inner contents of a section should not be rendered.

Parameters
string$argumentsVariableName
string$renderChildrenClosureVariableName
string$initializationPhpCode
\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\AbstractNode$syntaxTreeNode
\TYPO3\CMS\Fluid\Core\Compiler\TemplateCompiler$templateCompiler
Returns
string

Definition at line 115 of file Classes/ViewHelpers/SectionViewHelper.php.

initializeArguments ( )

Initialize the arguments.

Returns
void

Definition at line 64 of file Classes/ViewHelpers/SectionViewHelper.php.

References AbstractViewHelper\registerArgument().

static postParseEvent ( \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode  $syntaxTreeNode,
array  $viewHelperArguments,
\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer  $variableContainer 
)
static

Save the associated view helper node in a static public class variable. called directly after the view helper was built.

Parameters
\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode$syntaxTreeNode
array$viewHelperArguments
\TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer$variableContainer
Returns
void

Definition at line 78 of file Classes/ViewHelpers/SectionViewHelper.php.

render ( )

Rendering directly returns all child nodes.

Returns
string HTML String of all child nodes.

Definition at line 96 of file Classes/ViewHelpers/SectionViewHelper.php.

References AbstractViewHelper\renderChildren().