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
Afficher le fichier Open project: fluidtypo3/vhs Class Usage Examples

Protected Properties

Свойство Type Description
$pageService FluidTYPO3\Vhs\Service\PageService
$tagName string

Méthodes publiques

Méthode 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 )

Méthodes protégées

Méthode 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 méthode

protected autoRender ( array $menu, integer $level = 1 ) : string
$menu array
$level integer
Résultat string

backupVariables() public méthode

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

cleanTemplateVariableContainer() protected méthode

cleanupSubmenuVariables() protected méthode

protected cleanupSubmenuVariables ( )

determineParentPageUid() protected méthode

protected determineParentPageUid ( null | integer $pageUid = null, integer $entryLevel ) : null | integer
$pageUid null | integer
$entryLevel integer
Résultat null | integer

getArguments() public méthode

public getArguments ( ) : array
Résultat array

getItemTitle() protected méthode

protected getItemTitle ( array $page ) : string
$page array
Résultat string

getMenu() public méthode

public getMenu ( null | integer $pageUid = null, integer $entryLevel ) : array
$pageUid null | integer
$entryLevel integer
Résultat array

getWrappingTagName() public méthode

Returns the wrapping tag to use
public getWrappingTagName ( ) : string
Résultat string

initalizeSubmenuVariables() protected méthode

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 méthode

Initialize
public initializeArguments ( ) : void
Résultat void

injectPageService() public méthode

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

isNonWrappingMode() public méthode

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

parseMenu() public méthode

public parseMenu ( array $pages ) : array
$pages array
Résultat array

processPagesArgument() public méthode

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

render() public méthode

public render ( ) : string
Résultat string

renderContent() public méthode

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

restoreVariables() public méthode

Restores all saved template variables
public restoreVariables ( )

retrieveReconfiguredParentMenuInstance() protected méthode

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
Résultat AbstractMenuViewHelper | null

setOriginal() public méthode

public setOriginal ( boolean $original )
$original boolean

unsetDeferredVariableStorage() protected méthode

Property Details

$pageService protected_oe property

protected PageService,FluidTYPO3\Vhs\Service $pageService
Résultat FluidTYPO3\Vhs\Service\PageService

$tagName protected_oe property

protected string $tagName
Résultat string