MediaWiki master
MediaWiki\Skin\SkinComponentListItem Class Reference

Inherits MediaWiki\Skin\SkinComponent.

Collaboration diagram for MediaWiki\Skin\SkinComponentListItem:

Public Member Functions

 __construct (string $key, array $item, MessageLocalizer $localizer, array $options=[], array $defaultLinkOptions=[])
 
 getTemplateData ()
 This returns all the data that is needed to the component.Returned array must be serialized. This will be passed directly to a template (usually Mustache) for rendering.
Returns
array Data related to component required to render.

 

Detailed Description

Definition at line 24 of file SkinComponentListItem.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Skin\SkinComponentListItem::__construct ( string  $key,
array  $item,
MessageLocalizer  $localizer,
array  $options = [],
array  $defaultLinkOptions = [] 
)
Parameters
string$key
array$item
MessageLocalizer$localizer
array$options
array$defaultLinkOptions

Definition at line 43 of file SkinComponentListItem.php.

Member Function Documentation

◆ getTemplateData()

MediaWiki\Skin\SkinComponentListItem::getTemplateData ( )

This returns all the data that is needed to the component.Returned array must be serialized. This will be passed directly to a template (usually Mustache) for rendering.

Returns
array Data related to component required to render.

Returns
array List item template data:
  • html-item: Full HTML for the list item with the content inside
  • name: Name/Key of the list item
  • html: String HTML for the list item content
  • id: ID of the list item
  • class: Classes for the list item
  • array-links: Array of link template data

Implements MediaWiki\Skin\SkinComponent.

Definition at line 220 of file SkinComponentListItem.php.


The documentation for this class was generated from the following file: