MediaWiki REL1_33
MonoBookTemplate Class Reference
Inheritance diagram for MonoBookTemplate:
Collaboration diagram for MonoBookTemplate:

Public Member Functions

 execute ()
 Template filter callback for MonoBook skin.
 
- Public Member Functions inherited from BaseTemplate
 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.
 
 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)
 Get a Message object with its context set.
 
 getPersonalTools ()
 Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate.
 
 getSidebar ( $options=[])
 
 getToolbox ()
 Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate.
 
 getTrail ()
 Get the basic end-page trail including bottomscripts, reporttime, and debug stuff.
 
 makeLink ( $key, $item, $options=[])
 Makes a link, usually used by makeListItem to generate a link for an item in a list used in navigation lists, portlets, portals, sidebars, etc...
 
 makeListItem ( $key, $item, $options=[])
 Generates a list item for a navigation, portlet, portal, sidebar... list.
 
 makeSearchButton ( $mode, $attrs=[])
 
 makeSearchInput ( $attrs=[])
 
 msg ( $str)
 
 msgHtml ( $str)
 
 msgWiki ( $str)
 
 printTrail ()
 Output getTrail.
 
- Public Member Functions inherited from QuickTemplate
 __construct (Config $config=null)
 
 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.
 
 haveData ( $str)
 
 haveMsg ( $msgKey)
 
 html ( $str)
 
 set ( $name, $value)
 Sets the value $value to $name.
 
 setRef ( $name, &$value)
 
 text ( $str)
 

Protected Member Functions

 deprecatedHookHack ( $hook, $hookOptions=[])
 Wrapper to catch output of old hooks expecting to write directly to page We no longer do things that way.
 
 getBox ( $name, $contents, $msg=null, $setOptions=[])
 Generate a sidebar box using getPortlet(); prefill some common stuff.
 
 getCactions ()
 Generate the cactions (content actions) tabs, as well as a second set of spoof tabs for mobile.
 
 getIfExists ( $object, $setOptions=[])
 Simple wrapper for random if-statement-wrapped $this->data things.
 
 getLanguageBox ()
 Generate the languages box.
 
 getMobileNavigationIcon ( $target, $title)
 Create a wrapped link to create a mobile toggle/jump icon Needs to be an on-page link (as opposed to drawing something on the fly for an onclick event) for no-js support.
 
 getPortlet ( $name, $content, $msg=null, $setOptions=[])
 Generates a block of navigation links with a header.
 
 getRenderedSidebar ()
 Generate the full sidebar.
 
 getSearchBox ()
 Generate the search, using config options for buttons (?)
 
 getSimpleFooter ()
 Renderer for getFooterIcons and getFooterLinks as a generic footer block.
 
 getToolboxBox ()
 Generate the toolbox, complete with all three old hooks.
 
 mergeClasses ( $class, $extraClasses)
 Helper function for getPortlet.
 
- Protected Member Functions inherited from BaseTemplate
 getAfterPortlet ( $name)
 Allows extensions to hook into known portlets and add stuff to them.
 
 getClear ()
 Get a div with the core visualClear class, for clearing floats.
 
 getFooter ( $iconStyle='icononly', $linkStyle='flat')
 Renderer for getFooterIcons and getFooterLinks.
 
 renderAfterPortlet ( $name)
 

Additional Inherited Members

- Public Attributes inherited from QuickTemplate
array $data
 
- Protected Attributes inherited from QuickTemplate
 $config
 

Detailed Description

Definition at line 30 of file MonoBookTemplate.php.

Member Function Documentation

◆ deprecatedHookHack()

MonoBookTemplate::deprecatedHookHack ( $hook,
$hookOptions = [] )
protected

Wrapper to catch output of old hooks expecting to write directly to page We no longer do things that way.

Parameters
string$hookevent
array$hookOptionsargs
Returns
string html

Definition at line 534 of file MonoBookTemplate.php.

References and().

Referenced by execute(), getPortlet(), and getToolboxBox().

◆ execute()

MonoBookTemplate::execute ( )

Template filter callback for MonoBook skin.

Takes an associative array of data set from a SkinTemplate-based class, and a wrapper for MediaWiki's localization database, and outputs a formatted page.

Reimplemented from QuickTemplate.

Definition at line 38 of file MonoBookTemplate.php.

References $html, deprecatedHookHack(), getBox(), getCactions(), BaseTemplate\getClear(), getIfExists(), BaseTemplate\getIndicators(), getMobileNavigationIcon(), BaseTemplate\getMsg(), BaseTemplate\getPersonalTools(), getRenderedSidebar(), getSimpleFooter(), QuickTemplate\getSkin(), BaseTemplate\getTrail(), text, and Linker\tooltipAndAccesskeyAttribs().

◆ getBox()

MonoBookTemplate::getBox ( $name,
$contents,
$msg = null,
$setOptions = [] )
protected

Generate a sidebar box using getPortlet(); prefill some common stuff.

Parameters
string$name
array | string$contents
null | string | array | bool$msg
array$setOptions
Returns
string html

Definition at line 345 of file MonoBookTemplate.php.

References $options, $value, and(), BaseTemplate\getMsg(), getPortlet(), QuickTemplate\getSkin(), User\groupHasPermission(), and BaseTemplate\makeListItem().

Referenced by execute(), getCactions(), getLanguageBox(), getRenderedSidebar(), getSearchBox(), and getToolboxBox().

◆ getCactions()

MonoBookTemplate::getCactions ( )
protected

Generate the cactions (content actions) tabs, as well as a second set of spoof tabs for mobile.

Returns
string html

Definition at line 164 of file MonoBookTemplate.php.

References $attribs, $html, and(), getBox(), and BaseTemplate\getMsg().

Referenced by execute().

◆ getIfExists()

MonoBookTemplate::getIfExists ( $object,
$setOptions = [] )
protected

Simple wrapper for random if-statement-wrapped $this->data things.

Parameters
string$objectname of thing
array$setOptions
Returns
string html

Definition at line 555 of file MonoBookTemplate.php.

References $html, $options, and $value.

Referenced by execute().

◆ getLanguageBox()

MonoBookTemplate::getLanguageBox ( )
protected

Generate the languages box.

Returns
string html

Definition at line 325 of file MonoBookTemplate.php.

References $html, and getBox().

Referenced by getRenderedSidebar().

◆ getMobileNavigationIcon()

MonoBookTemplate::getMobileNavigationIcon ( $target,
$title )
protected

Create a wrapped link to create a mobile toggle/jump icon Needs to be an on-page link (as opposed to drawing something on the fly for an onclick event) for no-js support.

Parameters
string$targetlink target
string$titleicon title
Returns
string html empty link block

Definition at line 150 of file MonoBookTemplate.php.

Referenced by execute().

◆ getPortlet()

MonoBookTemplate::getPortlet ( $name,
$content,
$msg = null,
$setOptions = [] )
protected

Generates a block of navigation links with a header.

Parameters
string$name
array | string$contentarray of links for use with makeListItem, or a block of text
null | string | array$msg
array$setOptionsrandom crap to rename/do/whatever
Returns
string html

Definition at line 389 of file MonoBookTemplate.php.

References $content, $html, $name, $options, $value, and(), deprecatedHookHack(), BaseTemplate\getAfterPortlet(), BaseTemplate\getMsg(), BaseTemplate\makeListItem(), mergeClasses(), and Linker\titleAttrib().

Referenced by getBox().

◆ getRenderedSidebar()

MonoBookTemplate::getRenderedSidebar ( )
protected

Generate the full sidebar.

Returns
string html

Definition at line 219 of file MonoBookTemplate.php.

References $content, $html, and(), getBox(), getLanguageBox(), getSearchBox(), getToolboxBox(), and string.

Referenced by execute().

◆ getSearchBox()

MonoBookTemplate::getSearchBox ( )
protected

Generate the search, using config options for buttons (?)

Returns
string html

Definition at line 265 of file MonoBookTemplate.php.

References $html, getBox(), BaseTemplate\getMsg(), BaseTemplate\makeSearchButton(), and BaseTemplate\makeSearchInput().

Referenced by getRenderedSidebar().

◆ getSimpleFooter()

MonoBookTemplate::getSimpleFooter ( )
protected

Renderer for getFooterIcons and getFooterLinks as a generic footer block.

Returns
string html

Definition at line 588 of file MonoBookTemplate.php.

References $html, BaseTemplate\getFooterIcons(), BaseTemplate\getFooterLinks(), and QuickTemplate\getSkin().

Referenced by execute().

◆ getToolboxBox()

MonoBookTemplate::getToolboxBox ( )
protected

Generate the toolbox, complete with all three old hooks.

Returns
string html

Definition at line 305 of file MonoBookTemplate.php.

References $html, and(), deprecatedHookHack(), getBox(), and BaseTemplate\getToolbox().

Referenced by getRenderedSidebar().

◆ mergeClasses()

MonoBookTemplate::mergeClasses ( $class,
$extraClasses )
protected

Helper function for getPortlet.

Merge all provided css classes into a single array Account for possible different input methods matching what Html::element stuff takes

Parameters
string | array$classbase portlet/body class
string | array$extraClassesany extra classes to also include
Returns
array all classes to apply

Definition at line 514 of file MonoBookTemplate.php.

References and().

Referenced by getPortlet().


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