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

Public Member Functions

 initializeArguments ()
 
 render ()
 
- 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 ()
 

Protected Member Functions

 findBySection ($pageUid, $type= '', $column=0)
 
- 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractViewHelper
static renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Protected Attributes inherited from AbstractViewHelper
 $arguments
 
 $templateVariableContainer
 
 $controllerContext
 
 $renderingContext
 
 $renderChildrenClosure = null
 
 $viewHelperVariableContainer
 
 $objectManager
 
 $escapingInterceptorEnabled = true
 

Detailed Description

A view helper which returns content elements with 'Show in Section Menus' enabled

By default only content in colPos=0 will be found. This can be overruled by using "column"

If you set property "type" to 'all', then the 'Show in Section Menus' checkbox is not considered and all content elements are selected.

If the property "type" is 'header' then only content elements with a visible header layout (and a non-empty 'header' field!) are selected. In other words, if the header layout of an element is set to 'Hidden' then the element will not be in the results.

= Example =

<ce:menu.section pageUid="1" as="contentElements"> <f:for each="{contentElements}" as="contentElement"> {contentElement.header} </f:for> </ce:menu.section>

<output> Content element 1 in page with uid = 1 and "Show in section menu's" enabled Content element 2 in page with uid = 1 and "Show in section menu's" enabled Content element 3 in page with uid = 1 and "Show in section menu's" enabled </output>

Definition at line 47 of file styled_content/Classes/ViewHelpers/Menu/SectionViewHelper.php.

Member Function Documentation

findBySection (   $pageUid,
  $type = '',
  $column = 0 
)
protected

Find content with 'Show in Section Menus' enabled in a page

By default only content in colPos=0 will be found. This can be overruled by using $column

If you set property type to "all", then the 'Show in Section Menus' checkbox is not considered and all content elements are selected.

If the property $type is 'header' then only content elements with a visible header layout (and a non-empty 'header' field!) is selected. In other words, if the header layout of an element is set to 'Hidden' then the page will not appear in the menu.

Parameters
int$pageUidThe page uid
string$typeSearch method
int$columnRestrict content by the column number
Returns
array

Definition at line 105 of file styled_content/Classes/ViewHelpers/Menu/SectionViewHelper.php.

Referenced by SectionViewHelper\render().

initializeArguments ( )

Initialize ViewHelper arguments

Returns
void

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

References AbstractViewHelper\registerArgument().

render ( )

Render the view helper

Returns
string

Definition at line 69 of file styled_content/Classes/ViewHelpers/Menu/SectionViewHelper.php.

References SectionViewHelper\findBySection().