PHP Class FluidTYPO3\Vhs\ViewHelpers\Menu\AbstractMenuViewHelper

Inheritance: extends TYPO3\CMS\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper, use trait FluidTYPO3\Vhs\Traits\PageRecordViewHelperTrait, use trait FluidTYPO3\Vhs\Traits\TagViewHelperTrait
Datei anzeigen Open project: fluidtypo3/vhs Class Usage Examples

Protected Properties

Property Type Description
$pageService FluidTYPO3\Vhs\Service\PageService
$tagName string

Public Methods

Method Description
backupVariables ( ) Saves copies of all template variables while rendering the menu
getArguments ( ) : array
getMenu ( null | integer $pageUid = null, integer $entryLevel ) : array
getWrappingTagName ( ) : string Returns the wrapping tag to use
initializeArguments ( ) : void Initialize
injectPageService ( PageService $pageService )
isNonWrappingMode ( ) : boolean Returns TRUE for non-wrapping mode which is triggered by setting tagNameChildren to 'a'
parseMenu ( array $pages ) : array
processPagesArgument ( mixed $pages = null ) : array Returns array of page UIDs from provided pages
render ( ) : string
renderContent ( array $menu ) : string Renders the tag's content or if omitted auto renders the menu for the provided arguments
restoreVariables ( ) Restores all saved template variables
setOriginal ( boolean $original )

Protected Methods

Method Description
autoRender ( array $menu, integer $level = 1 ) : string
cleanTemplateVariableContainer ( )
cleanupSubmenuVariables ( )
determineParentPageUid ( null | integer $pageUid = null, integer $entryLevel ) : null | integer
getItemTitle ( array $page ) : string
initalizeSubmenuVariables ( ) Initialize variables used by the submenu instance recycler. Variables set here may be read by the Page / Menu / Sub ViewHelper which then automatically repeats rendering using the exact same arguments but with a new page UID as starting page.
renderItemLink ( array $page ) : string
retrieveReconfiguredParentMenuInstance ( integer $pageUid ) : AbstractMenuViewHelper | null Retrieves a stored, if any, parent instance of a menu. Although only implemented by the Page / Menu / Sub ViewHelper, placing this method in this abstract class instead will allow custom menu ViewHelpers to work as sub menu ViewHelpers without being forced to implement their own variable retrieval or subclass Page / Menu / Sub.
unsetDeferredVariableStorage ( )

Method Details

autoRender() protected method

protected autoRender ( array $menu, integer $level = 1 ) : string
$menu array
$level integer
return string

backupVariables() public method

Saves copies of all template variables while rendering the menu
public backupVariables ( )

cleanTemplateVariableContainer() protected method

cleanupSubmenuVariables() protected method

protected cleanupSubmenuVariables ( )

determineParentPageUid() protected method

protected determineParentPageUid ( null | integer $pageUid = null, integer $entryLevel ) : null | integer
$pageUid null | integer
$entryLevel integer
return null | integer

getArguments() public method

public getArguments ( ) : array
return array

getItemTitle() protected method

protected getItemTitle ( array $page ) : string
$page array
return string

getMenu() public method

public getMenu ( null | integer $pageUid = null, integer $entryLevel ) : array
$pageUid null | integer
$entryLevel integer
return array

getWrappingTagName() public method

Returns the wrapping tag to use
public getWrappingTagName ( ) : string
return string

initalizeSubmenuVariables() protected method

Note that the submenu VieWHelper is only capable of recycling one type of menu at a time - for example, a List menu nested inside a regular Menu ViewHelper will simply start another menu rendering completely separate from the parent menu.

initializeArguments() public method

Initialize
public initializeArguments ( ) : void
return void

injectPageService() public method

public injectPageService ( PageService $pageService )
$pageService FluidTYPO3\Vhs\Service\PageService

isNonWrappingMode() public method

Returns TRUE for non-wrapping mode which is triggered by setting tagNameChildren to 'a'
public isNonWrappingMode ( ) : boolean
return boolean

parseMenu() public method

public parseMenu ( array $pages ) : array
$pages array
return array

processPagesArgument() public method

Returns array of page UIDs from provided pages
public processPagesArgument ( mixed $pages = null ) : array
$pages mixed
return array

render() public method

public render ( ) : string
return string

renderContent() public method

Renders the tag's content or if omitted auto renders the menu for the provided arguments
public renderContent ( array $menu ) : string
$menu array
return string

restoreVariables() public method

Restores all saved template variables
public restoreVariables ( )

retrieveReconfiguredParentMenuInstance() protected method

Returns NULL if no parent exists.
protected retrieveReconfiguredParentMenuInstance ( integer $pageUid ) : AbstractMenuViewHelper | null
$pageUid integer UID of page that's the new parent page, overridden in arguments of cloned and recycled menu ViewHelper instance
return AbstractMenuViewHelper | null

setOriginal() public method

public setOriginal ( boolean $original )
$original boolean

unsetDeferredVariableStorage() protected method

Property Details

$pageService protected_oe property

protected PageService,FluidTYPO3\Vhs\Service $pageService
return FluidTYPO3\Vhs\Service\PageService

$tagName protected_oe property

protected string $tagName
return string