MediaWiki master
|
Extended QuickTemplate with additional MediaWiki-specific helper methods. More...
Inherits QuickTemplate.
Public Member Functions | |
getIndicators () | |
Get the suggested HTML for page status indicators: icons (or short text snippets) usually displayed in the top-right corner of the page, outside of the main content. | |
getMsg ( $name,... $params) | |
Get a Message object with its context set. | |
getPersonalTools () | |
makeListItem ( $key, $item, $options=[]) | |
Wrapper for Skin method. | |
msg ( $str) | |
Public Member Functions inherited from QuickTemplate | |
__construct (?Config $config=null) | |
deprecate (string $name, string $version) | |
Sets a template key as deprecated. | |
execute () | |
Main function, used by classes that subclass QuickTemplate to show the actual HTML output. | |
extend ( $name, $value) | |
extends the value of data with name $name with the value $value | |
get ( $name, $default=null) | |
Gets the template data requested. | |
getHTML () | |
Fetch the output of a QuickTemplate and return it. | |
getSkin () | |
Get the Skin object related to this object. | |
html ( $str) | |
set ( $name, $value) | |
Sets the value $value to $name. | |
Protected Member Functions | |
getClear () | |
Get a div with the core visualClear class, for clearing floats. | |
getFooter ( $iconStyle='icononly', $linkStyle='flat') | |
Renderer for getFooterIcons and getFooterLinks. | |
getFooterIcons ( $option=null) | |
Returns an array of footer icons filtered down by options relevant to how the skin wishes to display them. | |
getFooterLinks ( $option=null) | |
Returns an array of footerlinks trimmed down to only those footer links that are valid. | |
getSidebar ( $options=[]) | |
makeLink ( $key, $item, $options=[]) | |
Wrapper for Skin method. | |
makeSearchButton ( $mode, $attrs=[]) | |
Wrapper for Skin method. | |
makeSearchInput ( $attrs=[]) | |
Wrapper for Skin method. | |
Protected Member Functions inherited from QuickTemplate | |
haveMsg ( $msgKey) | |
text ( $str) | |
Additional Inherited Members | |
Public Attributes inherited from QuickTemplate | |
array | $data |
Protected Attributes inherited from QuickTemplate | |
Config | $config |
Extended QuickTemplate with additional MediaWiki-specific helper methods.
Definition at line 36 of file BaseTemplate.php.
|
protected |
Get a div with the core visualClear class, for clearing floats.
Definition at line 349 of file BaseTemplate.php.
Referenced by getFooter().
|
protected |
Renderer for getFooterIcons and getFooterLinks.
string | $iconStyle | $option for getFooterIcons: "icononly", "nocopyright" the "nocopyright" option is deprecated in 1.35 because of its association with getFooterIcons |
string | $linkStyle | $option for getFooterLinks: "flat" |
Definition at line 292 of file BaseTemplate.php.
References getClear(), getFooterIcons(), getFooterLinks(), and QuickTemplate\getSkin().
|
protected |
Returns an array of footer icons filtered down by options relevant to how the skin wishes to display them.
If you pass "icononly" as the option all footer icons which do not have an image icon set will be filtered out. If you pass "nocopyright" then MediaWiki's copyright icon will not be included in the list of footer icons. This is mostly useful for skins which only display the text from footericons instead of the images and don't want a duplicate copyright statement because footerlinks already rendered one.
string | null | $option |
Definition at line 247 of file BaseTemplate.php.
References wfDeprecated().
Referenced by getFooter().
|
protected |
Returns an array of footerlinks trimmed down to only those footer links that are valid.
If you pass "flat" as an option then the returned array will be a flat array of footer icons instead of a key/value array of footerlinks arrays broken up into categories.
string | null | $option |
Definition at line 208 of file BaseTemplate.php.
Referenced by getFooter().
BaseTemplate::getIndicators | ( | ) |
Get the suggested HTML for page status indicators: icons (or short text snippets) usually displayed in the top-right corner of the page, outside of the main content.
Your skin may implement this differently, for example by handling some indicator names specially with a different UI. However, it is recommended to use a <div class="mw-indicator" id="mw-indicator-<id>" />
as a wrapper element for each indicator, for better compatibility with extensions and user scripts.
The raw data is available in ‘$this->data['indicators’]` as an associative array (keys: identifiers, values: contents) internally ordered by keys.
Definition at line 368 of file BaseTemplate.php.
BaseTemplate::getMsg | ( | $name, | |
$params ) |
Get a Message object with its context set.
string | $name | Message name @phpcs:ignore Generic.Files.LineLength |
MessageParam|MessageSpecifier|string|int|float|list<MessageParam|MessageSpecifier|string|int|float> | ...$params See Message::params() |
Definition at line 47 of file BaseTemplate.php.
References $params, and QuickTemplate\getSkin().
Referenced by getSidebar(), and msg().
BaseTemplate::getPersonalTools | ( | ) |
|
protected |
array | $options | (optional) allows disabling certain sidebar elements. The keys search , toolbox and languages are accepted. |
Definition at line 67 of file BaseTemplate.php.
References getMsg(), and QuickTemplate\getSkin().
|
protected |
Wrapper for Skin method.
string | $key | of link |
array | $item | to render |
array | $options | for link |
Definition at line 162 of file BaseTemplate.php.
References QuickTemplate\getSkin().
BaseTemplate::makeListItem | ( | $key, | |
$item, | |||
$options = [] ) |
Wrapper for Skin method.
string | $key | of list item |
array | $item | to render |
array | $options | for list item |
Definition at line 174 of file BaseTemplate.php.
References QuickTemplate\getSkin().
|
protected |
Wrapper for Skin method.
string | $mode | |
array | $attrs |
Definition at line 195 of file BaseTemplate.php.
References QuickTemplate\getSkin().
|
protected |
Wrapper for Skin method.
array | $attrs |
Definition at line 184 of file BaseTemplate.php.
References QuickTemplate\getSkin().
BaseTemplate::msg | ( | $msgKey | ) |
string | $msgKey |
Reimplemented from QuickTemplate.
Definition at line 51 of file BaseTemplate.php.
References getMsg().