Model for a simple menu entries with label and icon.
More...
|
| __construct ( $name, $text, $url, $className='') |
| Create a simple menu element with one component.
|
|
| overrideIcon ( $icon) |
| Override the icon used in the home menu entry.
|
|
| overrideText ( $text) |
| Override the text used in the home menu entry.
|
|
| getName () |
| @inheritDoc
|
|
| getCSSClasses () |
| @inheritDoc
|
|
| getComponents () |
| @inheritDoc
|
|
| trackClicks ( $eventName) |
|
| setIcon ( $iconName, $iconType='before', $additionalClassNames='', $iconPrefix='minerva') |
| Set the Menu entry icon.
|
|
| setTitle (Message $message) |
| Set the menu entry title.
|
|
| setNodeID ( $nodeID) |
| Set the Menu entry ID html attribute.
|
|
| setJSOnly () |
| Mark entry as JS only.
|
|
|
static | create ( $name, $text, $url, $className='', $icon=null, $trackable=false) |
| Create a Single Menu entry with text, icon and active click tracking.
|
|
Model for a simple menu entries with label and icon.
◆ __construct()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::__construct |
( |
| $name, |
|
|
| $text, |
|
|
| $url, |
|
|
| $className = '' ) |
Create a simple menu element with one component.
- Parameters
-
string | $name | An unique menu element identifier |
string | $text | Text to show on menu element |
string | $url | URL menu element points to |
string | array | $className | Additional CSS class names. |
◆ create()
static MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::create |
( |
| $name, |
|
|
| $text, |
|
|
| $url, |
|
|
| $className = '', |
|
|
| $icon = null, |
|
|
| $trackable = false ) |
|
static |
Create a Single Menu entry with text, icon and active click tracking.
- Parameters
-
string | $name | Entry identifier |
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. |
- Returns
- static
◆ getComponents()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::getComponents |
( |
| ) |
|
◆ getCSSClasses()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::getCSSClasses |
( |
| ) |
|
◆ getName()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::getName |
( |
| ) |
|
◆ overrideIcon()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::overrideIcon |
( |
| $icon | ) |
|
Override the icon used in the home menu entry.
- Parameters
-
- Returns
- $this
◆ overrideText()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::overrideText |
( |
| $text | ) |
|
Override the text used in the home menu entry.
- Parameters
-
- Returns
- $this
◆ setIcon()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::setIcon |
( |
| $iconName, |
|
|
| $iconType = 'before', |
|
|
| $additionalClassNames = '', |
|
|
| $iconPrefix = 'minerva' ) |
Set the Menu entry icon.
- Parameters
-
string | null | $iconName | |
string | $iconType | |
string | $additionalClassNames | Additional classes |
string | $iconPrefix | either wikimedia or minerva |
- Returns
- $this
◆ setNodeID()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::setNodeID |
( |
| $nodeID | ) |
|
Set the Menu entry ID html attribute.
- Parameters
-
- Returns
- $this
◆ setTitle()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::setTitle |
( |
Message | $message | ) |
|
Set the menu entry title.
- Parameters
-
Message | $message | Title message |
- Returns
- $this
◆ trackClicks()
MediaWiki\Minerva\Menu\Entries\SingleMenuEntry::trackClicks |
( |
| $eventName | ) |
|
- Parameters
-
string | $eventName | Should clicks be tracked. To override the tracking code pass the tracking code as string |
- Returns
- $this
The documentation for this class was generated from the following file:
- includes/Menu/Entries/SingleMenuEntry.php