[ Index ]

PHP Cross Reference of DokuWiki




/inc/Menu/ -> AbstractMenu.php (summary)

Class AbstractMenu Basic menu functionality. A menu defines a list of AbstractItem that shall be shown. It contains convenience functions to display the menu in HTML, but template authors can also just accesst the items via getItems() and create the HTML as however they see fit.

File Size: 96 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions


Functions that are not part of a class:

__construct($context = AbstractItem::CTX_DESKTOP)   X-Ref
AbstractMenu constructor.

param: int $context the context this menu is used in

getItems()   X-Ref
Get the list of action items in this menu

return: AbstractItem[]

loadItems(&$data)   X-Ref
Default action for the MENU_ITEMS_ASSEMBLY event

param: array $data The plugin data
see: getItems()

getListItems($classprefix = '', $svg = true)   X-Ref
Generate HTML list items for this menu

This is a convenience method for template authors. If you need more fine control over the
output, use getItems() and build the HTML yourself

return: string
param: string|false $classprefix create a class from type with this prefix, false for no class
param: bool $svg add the SVG link