MediaWiki  1.32.5
TimelessTemplate Class Reference

BaseTemplate class for the Timeless skin. More...

Inheritance diagram for TimelessTemplate:
Collaboration diagram for TimelessTemplate:

Public Member Functions

 execute ()
 Outputs the entire contents of the page. More...
 
- 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. More...
 
 getFooterLinks ( $option=null)
 Returns an array of footerlinks trimmed down to only those footer links that are valid. More...
 
 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. More...
 
 getMsg ( $name)
 Get a Message object with its context set. More...
 
 getPersonalTools ()
 Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate. More...
 
 getSidebar ( $options=[])
 
 getToolbox ()
 Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate. More...
 
 getTrail ()
 Get the basic end-page trail including bottomscripts, reporttime, and debug stuff. More...
 
 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... More...
 
 makeListItem ( $key, $item, $options=[])
 Generates a list item for a navigation, portlet, portal, sidebar... More...
 
 makeSearchButton ( $mode, $attrs=[])
 
 makeSearchInput ( $attrs=[])
 
 msg ( $str)
 
 msgHtml ( $str)
 
 msgWiki ( $str)
 An ugly, ugly hack. More...
 
 printTrail ()
 Output getTrail. More...
 
- 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 More...
 
 get ( $name, $default=null)
 Gets the template data requested. More...
 
 getHTML ()
 Fetch the output of a QuickTemplate and return it. More...
 
 getSkin ()
 Get the Skin object related to this object. More...
 
 haveData ( $str)
 
 haveMsg ( $msgKey)
 
 html ( $str)
 
 set ( $name, $value)
 Sets the value $value to $name. More...
 
 setRef ( $name, &$value)
 
 text ( $str)
 

Protected Member Functions

 getAfterContent ()
 The data after content, catlinks, and potential other stuff that may appear within the content block but after the main content. More...
 
 getCategories ()
 Categories for the sidebar. More...
 
 getCatList ( $list, $id, $class, $message)
 List of categories. More...
 
 getContentSub ()
 Links and information that may appear below the firstHeading. More...
 
 getHeaderHack ()
 The colour bars Split this out so we don't have to look at it/can easily kill it later. More...
 
 getInterlanguageLinks ()
 Interlanguage links block, also with variants. More...
 
 getLogo ( $id='p-logo', $part='both')
 The logo and (optionally) site title. More...
 
 getMainNavigation ()
 Left sidebar navigation, usually. More...
 
 getPageTools ()
 Generate pile of all the tools. More...
 
 getPageToolSidebar ()
 Page tools in sidebar. More...
 
 getPortlet ( $name, $content, $msg=null)
 Generates a block of navigation links with a header. More...
 
 getSearch ()
 The search box at the top. More...
 
 getSidebarChunk ( $id, $headerMessage, $content)
 Sidebar chunk containing one or more portlets. More...
 
 getSiteNotices ()
 Notices that may appear above the firstHeading. More...
 
 getUserLinks ()
 Personal/user links portlet for header. More...
 
- Protected Member Functions inherited from BaseTemplate
 getAfterPortlet ( $name)
 Allows extensions to hook into known portlets and add stuff to them. More...
 
 getClear ()
 Get a div with the core visualClear class, for clearing floats. More...
 
 getFooter ( $iconStyle='icononly', $linkStyle='flat')
 Renderer for getFooterIcons and getFooterLinks. More...
 
 renderAfterPortlet ( $name)
 

Protected Attributes

array $pileOfTools
 
- Protected Attributes inherited from QuickTemplate
 $config
 

Additional Inherited Members

- Public Attributes inherited from QuickTemplate
array $data
 

Detailed Description

BaseTemplate class for the Timeless skin.

Definition at line 7 of file TimelessTemplate.php.

Member Function Documentation

◆ execute()

◆ getAfterContent()

TimelessTemplate::getAfterContent ( )
protected

The data after content, catlinks, and potential other stuff that may appear within the content block but after the main content.

Returns
string html

Definition at line 556 of file TimelessTemplate.php.

References $html, Html\closeElement(), data, and Html\openElement().

Referenced by execute().

◆ getCategories()

TimelessTemplate::getCategories ( )
protected

Categories for the sidebar.

Assemble an array of categories. This doesn't show any categories for the action=history view, but that behaviour is consistent with other skins.

Returns
string html

Definition at line 710 of file TimelessTemplate.php.

References $html, $skin, captcha-old\count, getCatList(), getSidebarChunk(), QuickTemplate\getSkin(), and NS_CATEGORY.

Referenced by execute().

◆ getCatList()

TimelessTemplate::getCatList (   $list,
  $id,
  $class,
  $message 
)
protected

List of categories.

Parameters
array$list
string$id
string | array$class
string | array$messagei18n message name or an array of [ message name, params ]
Returns
string html

Definition at line 764 of file TimelessTemplate.php.

References $html, Html\closeElement(), getPortlet(), Html\openElement(), and Html\rawElement().

Referenced by getCategories().

◆ getContentSub()

TimelessTemplate::getContentSub ( )
protected

Links and information that may appear below the firstHeading.

Returns
string html

Definition at line 535 of file TimelessTemplate.php.

References $html, Html\closeElement(), data, and Html\openElement().

Referenced by execute().

◆ getHeaderHack()

TimelessTemplate::getHeaderHack ( )
protected

The colour bars Split this out so we don't have to look at it/can easily kill it later.

Returns
string html

Definition at line 381 of file TimelessTemplate.php.

References $html, Html\element(), and Html\rawElement().

Referenced by execute().

◆ getInterlanguageLinks()

TimelessTemplate::getInterlanguageLinks ( )
protected

Interlanguage links block, also with variants.

Returns
string html

Definition at line 790 of file TimelessTemplate.php.

References $html, data, getPortlet(), and getSidebarChunk().

Referenced by execute().

◆ getLogo()

TimelessTemplate::getLogo (   $id = 'p-logo',
  $part = 'both' 
)
protected

The logo and (optionally) site title.

Parameters
string$id
string$partwhether it's only image, only text, or both
Returns
string html

Definition at line 260 of file TimelessTemplate.php.

References $html, Html\closeElement(), data, Html\element(), BaseTemplate\getMsg(), QuickTemplate\getSkin(), Html\openElement(), Html\rawElement(), and Linker\tooltipAndAccesskeyAttribs().

Referenced by execute().

◆ getMainNavigation()

TimelessTemplate::getMainNavigation ( )
protected

Left sidebar navigation, usually.

Returns
string html

Definition at line 350 of file TimelessTemplate.php.

References $content, $html, $name, as, getPortlet(), BaseTemplate\getSidebar(), getSidebarChunk(), and string.

Referenced by execute().

◆ getPageTools()

TimelessTemplate::getPageTools ( )
protected

Generate pile of all the tools.

We can make a few assumptions based on where a tool started out: If it's in the cactions region, it's a page tool, probably primary or secondary ...that's all I can think of

Returns
array of array of tools information (portlet formatting)

Definition at line 582 of file TimelessTemplate.php.

References $pileOfTools, $title, as, data, BaseTemplate\getMsg(), QuickTemplate\getSkin(), SpecialPage\getTitleFor(), and BaseTemplate\getToolbox().

Referenced by execute().

◆ getPageToolSidebar()

TimelessTemplate::getPageToolSidebar ( )
protected

Page tools in sidebar.

Returns
string html

Definition at line 410 of file TimelessTemplate.php.

References getPortlet(), and getSidebarChunk().

Referenced by execute().

◆ getPortlet()

TimelessTemplate::getPortlet (   $name,
  $content,
  $msg = null 
)
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 Expected array format: [ $name => [ 'links' => [ '0' => [ 'href' => ..., 'single-id' => ..., 'text' => ... ] ], 'id' => ..., 'active' => ... ], ... ]
null | string | array | bool$msg
Returns
string html
Since
1.29

Definition at line 145 of file TimelessTemplate.php.

References $content, $html, $name, $template, as, Html\closeElement(), BaseTemplate\getAfterPortlet(), BaseTemplate\getMsg(), BaseTemplate\makeListItem(), Html\openElement(), Html\rawElement(), Hooks\run(), and Linker\titleAttrib().

Referenced by execute(), getCatList(), getInterlanguageLinks(), getMainNavigation(), getPageToolSidebar(), and getUserLinks().

◆ getSearch()

TimelessTemplate::getSearch ( )
protected

The search box at the top.

Returns
string html

Definition at line 310 of file TimelessTemplate.php.

References $html, Html\closeElement(), BaseTemplate\getMsg(), Html\hidden(), BaseTemplate\makeSearchButton(), BaseTemplate\makeSearchInput(), Html\openElement(), and Html\rawElement().

Referenced by execute().

◆ getSidebarChunk()

TimelessTemplate::getSidebarChunk (   $id,
  $headerMessage,
  $content 
)
protected

Sidebar chunk containing one or more portlets.

Parameters
string$id
string$headerMessage
string$content
Returns
string html

Definition at line 234 of file TimelessTemplate.php.

References $content, $html, Html\element(), BaseTemplate\getMsg(), Html\rawElement(), and QuickTemplate\text().

Referenced by execute(), getCategories(), getInterlanguageLinks(), getMainNavigation(), and getPageToolSidebar().

◆ getSiteNotices()

TimelessTemplate::getSiteNotices ( )
protected

Notices that may appear above the firstHeading.

Returns
string html

Definition at line 517 of file TimelessTemplate.php.

References $html, data, and Html\rawElement().

Referenced by execute().

◆ getUserLinks()

TimelessTemplate::getUserLinks ( )
protected

Personal/user links portlet for header.

Returns
array [ html, class ], where class is an extra class to apply to surrounding objects (for width adjustments)

Definition at line 437 of file TimelessTemplate.php.

References $html, $user, as, Html\closeElement(), Html\element(), BaseTemplate\getMsg(), BaseTemplate\getPersonalTools(), getPortlet(), QuickTemplate\getSkin(), BaseTemplate\makeListItem(), Html\openElement(), and Html\rawElement().

Referenced by execute().

Member Data Documentation

◆ $pileOfTools

array TimelessTemplate::$pileOfTools
protected

Definition at line 10 of file TimelessTemplate.php.

Referenced by getPageTools().


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