SimpleMenuAction
in package
implements
IMenuAction
Class SimpleMenuAction
Tags
Table of Contents
Interfaces
- IMenuAction
- Interface IMenuAction
Properties
Methods
- __construct() : mixed
- SimpleMenuAction constructor.
- getData() : array{id: string, label: string, href: string, icon: string, details: string|null}
- Return JSON data to let the frontend render the menu entry.
- getIcon() : string
- The icon CSS class to use.
- getId() : string
- getLabel() : string
- The translated label of the menu item.
- getLink() : string
- The link this menu item points to.
- getPriority() : int
- render() : string
- Custom render function.
Properties
$detail
private
string
$detail
$icon
private
string
$icon
$id
private
string
$id
$label
private
string
$label
$link
private
string
$link
$priority
private
int
$priority
Methods
__construct()
SimpleMenuAction constructor.
public
__construct(string $id, string $label, string $icon[, string $link = '' ][, int $priority = 100 ][, string $detail = '' ]) : mixed
Parameters
- $id : string
- $label : string
- $icon : string
- $link : string = ''
- $priority : int = 100
- $detail : string = ''
Tags
getData()
Return JSON data to let the frontend render the menu entry.
public
getData() : array{id: string, label: string, href: string, icon: string, details: string|null}
Tags
Return values
array{id: string, label: string, href: string, icon: string, details: string|null}getIcon()
The icon CSS class to use.
public
getIcon() : string
Tags
Return values
stringgetId()
public
getId() : string
Tags
Return values
stringgetLabel()
The translated label of the menu item.
public
getLabel() : string
Tags
Return values
stringgetLink()
The link this menu item points to.
public
getLink() : string
Tags
Return values
stringgetPriority()
public
getPriority() : int
Tags
Return values
intrender()
Custom render function.
public
render() : string
The returned HTML must be wrapped within a listitem (<li>...</li>
).
- If an empty string is returned, the default design is used (based on the label and link specified).