TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu\SectionViewHelper Class Reference
Inheritance diagram for TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu\SectionViewHelper:
TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper

Public Member Functions

 initializeArguments ()
 
 render ()
 
- Public Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
 setArguments (array $arguments)
 
 setRenderingContext (\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 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='')
 
- Protected Member Functions inherited from TYPO3\CMS\Fluid\Core\ViewHelper\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 TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
static renderStatic (array $arguments, \Closure $renderChildrenClosure, \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Protected Attributes inherited from TYPO3\CMS\Fluid\Core\ViewHelper\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 48 of file SectionViewHelper.php.

Member Function Documentation

◆ findBySection()

TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu\SectionViewHelper::findBySection (   $pageUid,
  $type = '',
  $column = '' 
)
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
string$columnRestrict content by the column number
Returns
array

Definition at line 106 of file SectionViewHelper.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

Referenced by TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu\SectionViewHelper\render().

◆ initializeArguments()

TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu\SectionViewHelper::initializeArguments ( )

Initialize ViewHelper arguments

Returns
void

Definition at line 57 of file SectionViewHelper.php.

References TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper\registerArgument().

◆ render()

TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu\SectionViewHelper::render ( )

Render the view helper

Returns
string

Definition at line 70 of file SectionViewHelper.php.

References TYPO3\CMS\FluidStyledContent\ViewHelpers\Menu\SectionViewHelper\findBySection().