Model for a menu that can be presented in a skin.
More...
Model for a menu that can be presented in a skin.
◆ __construct()
MediaWiki\Minerva\Menu\Group::__construct |
( |
| $id | ) |
|
- Parameters
-
string | $id | of the menu defaults to null (optional) |
◆ getEntries()
MediaWiki\Minerva\Menu\Group::getEntries |
( |
| ) |
|
Get all entries represented as plain old PHP arrays.
- Returns
- array
◆ getEntryByName()
MediaWiki\Minerva\Menu\Group::getEntryByName |
( |
| $targetName | ) |
|
- Parameters
-
- Returns
- IMenuEntry
- Exceptions
-
◆ getId()
MediaWiki\Minerva\Menu\Group::getId |
( |
| ) |
|
Get the identifier for the group.
- Returns
- string
◆ hasEntries()
MediaWiki\Minerva\Menu\Group::hasEntries |
( |
| ) |
|
Return entries count.
- Returns
- bool
◆ insertAfter()
MediaWiki\Minerva\Menu\Group::insertAfter |
( |
| $targetName, |
|
|
| $name, |
|
|
| $text, |
|
|
| $url, |
|
|
| $className = '', |
|
|
| $icon = null, |
|
|
| $trackable = false, |
|
|
| $isJSOnly = false ) |
Insert an entry after an existing one.
- Deprecated
- since 1.39
- Parameters
-
string | $targetName | The name of the existing entry to insert the new entry after |
string | $name | The name of the new entry |
string | $text | Entry label |
string | $url | The URL entry points to |
string | $className | Optional HTML classes |
string | null | $icon | defaults to $name if not specified |
bool | $trackable | Whether an entry will track clicks or not. Default is false. |
bool | $isJSOnly | Whether the entry works without JS |
- Exceptions
-
DomainException | When the existing entry doesn't exist |
◆ insertEntry()
MediaWiki\Minerva\Menu\Group::insertEntry |
( |
IMenuEntry | $entry | ) |
|
Insert new menu entry.
- Parameters
-
- Exceptions
-
DomainException | When the entry already exists |
◆ serialize()
MediaWiki\Minerva\Menu\Group::serialize |
( |
| ) |
|
Serialize the group for use in a template.
- Returns
- array{entries:array,id:string}
The documentation for this class was generated from the following file: