‪TYPO3CMS  ‪main
TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory Class Reference
Inheritance diagram for TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 getMenuObjectByType (string $type='')
 
 registerMenuType (string $type, string $className)
 

Protected Attributes

array $menuTypeToClassMapping
 

Detailed Description

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.

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

Definition at line 30 of file MenuContentObjectFactory.php.

Member Function Documentation

◆ getMenuObjectByType()

TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory::getMenuObjectByType ( string  $type = '')

Gets a typo script string like 'TMENU' and returns an object of this type

Exceptions
Exception

Definition at line 44 of file MenuContentObjectFactory.php.

◆ registerMenuType()

TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory::registerMenuType ( string  $type,
string  $className 
)

Register new menu type or override existing type

Parameters
string$typeMenu type to be used in TypoScript
string$className‪Class rendering the menu

Definition at line 64 of file MenuContentObjectFactory.php.

Member Data Documentation

◆ $menuTypeToClassMapping

array TYPO3\CMS\Frontend\ContentObject\Menu\MenuContentObjectFactory::$menuTypeToClassMapping
protected
Initial value:
= [
'TMENU' => TextMenuContentObject::class,
]

Register of TypoScript keys to according render class

Definition at line 35 of file MenuContentObjectFactory.php.