MenuContentObjectFactory implements SingletonInterface

Factory for menu content objects. Allows overriding the default types like 'TMENU' with an own implementation (only one possible) and new types can be registered.

Internal

this is only used for internal purposes and solely used for EXT:frontend and not part of TYPO3's Core API.

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$menuTypeToClassMapping  : array<string|int, mixed>
Register of TypoScript keys to according render class

Methods

getMenuObjectByType()  : AbstractMenuContentObject
Gets a typo script string like 'TMENU' and returns an object of this type
registerMenuType()  : mixed
Register new menu type or override existing type

Properties

$menuTypeToClassMapping

Register of TypoScript keys to according render class

protected array<string|int, mixed> $menuTypeToClassMapping = ['TMENU' => \TYPO3\CMS\Frontend\ContentObject\Menu\TextMenuContentObject::class]

Methods

registerMenuType()

Register new menu type or override existing type

public registerMenuType(string $type, string $className) : mixed
Parameters
$type : string

Menu type to be used in TypoScript

$className : string

Class rendering the menu


        
On this page

Search results