‪TYPO3CMS  11.5
TYPO3\CMS\Backend\Template\Components\Menu\Menu Class Reference

Public Member Functions

string getLabel ()
 
Menu setLabel ($label)
 
Menu setIdentifier ($identifier)
 
 addMenuItem (MenuItem $menuItem)
 
array getMenuItems ()
 
string getIdentifier ()
 
string getDataIdentifier ()
 
MenuItem makeMenuItem ()
 
bool isValid (Menu $menu)
 

Protected Attributes

string $identifier = ''
 
string $label = ''
 
array $menuItems = array( )
 

Detailed Description

Menu

Definition at line 23 of file Menu.php.

Member Function Documentation

◆ addMenuItem()

TYPO3\CMS\Backend\Template\Components\Menu\Menu::addMenuItem ( MenuItem  $menuItem)

Adds a new menuItem

Parameters
MenuItem$menuItem‪The menuItem to add to the menu
Exceptions

Definition at line 86 of file Menu.php.

References TYPO3\CMS\Backend\Template\Components\AbstractControl\getTitle(), and TYPO3\CMS\Backend\Template\Components\Menu\MenuItem\isValid().

◆ getDataIdentifier()

string TYPO3\CMS\Backend\Template\Components\Menu\Menu::getDataIdentifier ( )

Get identifier for data attribute

Returns
‪string

Definition at line 121 of file Menu.php.

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

◆ getIdentifier()

string TYPO3\CMS\Backend\Template\Components\Menu\Menu::getIdentifier ( )

◆ getLabel()

string TYPO3\CMS\Backend\Template\Components\Menu\Menu::getLabel ( )

Get the label

Returns
‪string

Definition at line 48 of file Menu.php.

References TYPO3\CMS\Backend\Template\Components\Menu\Menu\$label.

◆ getMenuItems()

array TYPO3\CMS\Backend\Template\Components\Menu\Menu::getMenuItems ( )

Get menu items

Returns
‪array

Definition at line 101 of file Menu.php.

References TYPO3\CMS\Backend\Template\Components\Menu\Menu\$menuItems.

◆ isValid()

bool TYPO3\CMS\Backend\Template\Components\Menu\Menu::isValid ( Menu  $menu)

Validation function

Parameters
Menu$menu‪The menu to validate
Returns
‪bool

Definition at line 146 of file Menu.php.

References TYPO3\CMS\Backend\Template\Components\Menu\Menu\getIdentifier().

Referenced by TYPO3\CMS\Backend\Template\Components\MenuRegistry\addMenu().

◆ makeMenuItem()

MenuItem TYPO3\CMS\Backend\Template\Components\Menu\Menu::makeMenuItem ( )

◆ setIdentifier()

Menu TYPO3\CMS\Backend\Template\Components\Menu\Menu::setIdentifier (   $identifier)

◆ setLabel()

Menu TYPO3\CMS\Backend\Template\Components\Menu\Menu::setLabel (   $label)

Set label

Parameters
string$label‪LabelText for the menu (accepts LLL syntax)
Returns
Menu

Definition at line 60 of file Menu.php.

References TYPO3\CMS\Backend\Template\Components\Menu\Menu\$label.

Member Data Documentation

◆ $identifier

string TYPO3\CMS\Backend\Template\Components\Menu\Menu::$identifier = ''
protected

◆ $label

string TYPO3\CMS\Backend\Template\Components\Menu\Menu::$label = ''
protected

Label of the Menu (useful for Selectbox menus)

Definition at line 35 of file Menu.php.

Referenced by TYPO3\CMS\Backend\Template\Components\Menu\Menu\getLabel(), and TYPO3\CMS\Backend\Template\Components\Menu\Menu\setLabel().

◆ $menuItems

array TYPO3\CMS\Backend\Template\Components\Menu\Menu::$menuItems = array( )
protected

Container for menuitems

Definition at line 41 of file Menu.php.

Referenced by TYPO3\CMS\Backend\Template\Components\Menu\Menu\getMenuItems().