MediaWiki fundraising/REL1_35
|
The main skin class which provides methods and properties for all other skins. More...
Public Member Functions | |
__construct ( $options=null) | |
aboutLink () | |
Gets the link to the wiki's about page. | |
addToSidebar (&$bar, $message) | |
Add content from a sidebar system message Currently only used for MediaWiki:Sidebar (but may be used by Extensions) | |
addToSidebarPlain (&$bar, $text) | |
Add content from plain text. | |
bottomScripts () | |
This gets called shortly before the "</body>" tag. | |
buildSidebar () | |
Build an array that represents the sidebar(s), the navigation bar among them. | |
disclaimerLink () | |
Gets the link to the wiki's general disclaimers page. | |
doEditSectionLink (Title $nt, $section, $tooltip, Language $lang) | |
Create a section edit link. | |
editUrlOptions () | |
Return URL options for the 'edit page' link. | |
footerLink ( $desc, $page) | |
Returns an HTML link for use in the footer. | |
getAfterPortlet (string $name) | |
Allows extensions to hook into known portlets and add stuff to them. | |
getCategories () | |
getCategoryLinks () | |
getCopyright ( $type='detect') | |
getDefaultModules () | |
Defines the ResourceLoader modules that should be added to the skin It is recommended that skins wishing to override call parent::getDefaultModules() and substitute out any modules they wish to change by using a key to look them up. | |
getHtmlElementAttributes () | |
Return values for <html> element. | |
getIndicatorsHTML ( $indicators) | |
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. | |
getLanguages () | |
Generates array of language links for the current page. | |
getNewtalks () | |
Gets new talk page messages for the current user and returns an appropriate alert message (or an empty string if there are no messages) | |
getPageClasses ( $title) | |
TODO: document. | |
getPersonalToolsForMakeListItem ( $urls) | |
Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate. | |
getRelevantTitle () | |
Return the "relevant" title. | |
getRelevantUser () | |
Return the "relevant" user. | |
getRevisionId () | |
Get the current revision ID. | |
getSiteFooterLinks () | |
Gets the link to the wiki's privacy policy, about page, and disclaimer page. | |
getSiteNotice () | |
Get the site notice. | |
getSkinName () | |
getSkinStylePath ( $name) | |
Return a fully resolved style path URL to images or styles stored in the current skin's folder. | |
getUndeleteLink () | |
initPage (OutputPage $out) | |
Stable to override. | |
isRevisionCurrent () | |
Whether the revision displayed is the latest revision of the page. | |
logoText ( $align='') | |
mainPageLink () | |
Gets the link to the wiki's main page. | |
makeFooterIcon ( $icon, $withImage='withImage') | |
Renders a $wgFooterIcons icon according to the method's arguments. | |
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=[]) | |
makeToolbox ( $navUrls, $feedUrls) | |
Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate. | |
mapInterwikiToLanguage ( $code) | |
Allows correcting the language of interlanguage links which, mostly due to legacy reasons, do not always match the standards compliant language tag. | |
outputPage () | |
Outputs the HTML generated by other functions. | |
printSource () | |
Text with the permalink to the source page, usually shown on the footer of a printed page. | |
privacyLink () | |
Gets the link to the wiki's privacy policy page. | |
setRelevantTitle ( $t) | |
Set the "relevant" title. | |
setRelevantUser ( $u) | |
Set the "relevant" user. | |
setupSkinUserCss (OutputPage $out) | |
Hook point for adding style modules to OutputPage. | |
showEmailUser ( $id) | |
subPageSubtitle ( $out=null) | |
Public Member Functions inherited from ContextSource | |
canUseWikiPage () | |
Check whether a WikiPage object can be get with getWikiPage(). | |
exportSession () | |
Export the resolved user IP, HTTP headers, user ID, and session ID. | |
getConfig () | |
getContext () | |
Get the base IContextSource object. | |
getLanguage () | |
getOutput () | |
getRequest () | |
getSkin () | |
getStats () | |
getTiming () | |
getTitle () | |
getUser () | |
Stable to override. | |
getWikiPage () | |
Get the WikiPage object. | |
msg ( $key,... $params) | |
Get a Message object with context set Parameters are the same as wfMessage() | |
setContext (IContextSource $context) | |
Static Public Member Functions | |
static | checkTitle (&$title, $name) |
make sure we have some title to operate on | |
static | getAllowedSkins () |
Fetch the list of user-selectable skins in regards to $wgSkipSkins. | |
static | getDynamicStylesheetQuery () |
Get the query to generate a dynamic stylesheet. | |
static | getSkinNames () |
Fetch the set of available skins. | |
static | makeI18nUrl ( $name, $urlaction='') |
static | makeInternalOrExternalUrl ( $name) |
If url string starts with http, consider as external URL, else internal. | |
static | makeMainPageUrl ( $urlaction='') |
static | makeNSUrl ( $name, $urlaction='', $namespace=NS_MAIN) |
this can be passed the NS number as defined in Language.php | |
static | makeSpecialUrl ( $name, $urlaction='', $proto=null) |
Make a URL for a Special Page using the given query and protocol. | |
static | makeSpecialUrlSubpage ( $name, $subpage, $urlaction='') |
static | makeUrl ( $name, $urlaction='') |
static | makeVariablesScript ( $data, $nonce=null) |
static | normalizeKey ( $key) |
Normalize a skin preference value to a form that can be loaded. | |
Public Attributes | |
string | $stylename = null |
Stylesheets set to use. | |
Protected Member Functions | |
afterContentHook () | |
This runs a hook to allow extensions placing their stuff after content and article metadata (e.g. | |
buildFeedUrls () | |
Build data structure representing syndication links. | |
buildNavUrls () | |
Build array of common navigation links. | |
drawCategoryBrowser ( $tree) | |
Render the array as a series of links. | |
generateDebugHTML () | |
Generate debug data HTML for displaying at the bottom of the main content area. | |
getCopyrightIcon () | |
getFooterLinks () | |
Get template representation of the footer containing site footer links as well as standard footer links. | |
getIndicatorsData ( $indicators) | |
Return an array of indicator data. | |
getLogo () | |
URL to the default square logo (1x key) Please use ResourceLoaderSkinModule::getAvailableLogos. | |
getPoweredBy () | |
Gets the powered by MediaWiki icon. | |
getSearchLink () | |
lastModified () | |
Get the timestamp of the latest revision, formatted in user language. | |
preloadExistence () | |
Preload the existence of three commonly-requested pages in a single query. | |
Static Protected Member Functions | |
static | makeKnownUrlDetails ( $name, $urlaction='') |
Make URL details where the article exists (or at least it's convenient to think so) | |
static | makeUrlDetails ( $name, $urlaction='') |
these return an array with the 'href' and boolean 'exists' | |
Protected Attributes | |
$mRelevantTitle = null | |
$mRelevantUser = null | |
array | $options = [] |
Skin options passed into constructor. | |
string null | $skinname = null |
Private Member Functions | |
footerLinkTitle ( $desc, $page) | |
getCachedNotice ( $name) | |
Get a cached notice. | |
The main skin class which provides methods and properties for all other skins.
See docs/Skin.md for more information.
Stable to extend
Skin::__construct | ( | $options = null | ) |
string | null | array | $options | Options for the skin can be an array since 1.35. When an array is passed name represents skinname, scripts represents an array of ResourceLoader script modules and styles represents an array of ResourceLoader style modules to load on all pages. |
Skin::aboutLink | ( | ) |
Gets the link to the wiki's about page.
Definition at line 1119 of file Skin.php.
References footerLink().
Referenced by getSiteFooterLinks().
Skin::addToSidebar | ( | & | $bar, |
$message ) |
Add content from a sidebar system message Currently only used for MediaWiki:Sidebar (but may be used by Extensions)
This is just a wrapper around addToSidebarPlain() for backwards compatibility
array | &$bar | |
string | $message |
Definition at line 1692 of file Skin.php.
References addToSidebarPlain(), and ContextSource\msg().
Referenced by buildSidebar().
Skin::addToSidebarPlain | ( | & | $bar, |
$text ) |
Add content from plain text.
array | &$bar | |
string | $text |
Definition at line 1703 of file Skin.php.
References $line, $lines, $title, ContextSource\getConfig(), getTitle(), ContextSource\msg(), wfMatchesDomainList(), and wfUrlProtocols().
Referenced by addToSidebar().
|
protected |
This runs a hook to allow extensions placing their stuff after content and article metadata (e.g.
categories). Note: This function has nothing to do with afterContent().
This hook is placed here in order to allow using the same hook for all skins, both the SkinTemplate based ones and the older ones, which directly use this class to get their data.
The output of this function gets processed in SkinTemplate::outputPage() for the SkinTemplate based skins, all other skins should directly echo it.
Definition at line 639 of file Skin.php.
References wfDebug().
Referenced by SkinMustache\getTemplateData().
Skin::bottomScripts | ( | ) |
This gets called shortly before the "</body>" tag.
</body>
Definition at line 677 of file Skin.php.
References ContextSource\getOutput().
|
finalprotected |
Build data structure representing syndication links.
Definition at line 1597 of file Skin.php.
References ContextSource\getOutput(), and ContextSource\msg().
Referenced by buildSidebar().
|
protected |
Build array of common navigation links.
Assumes thispage property has been set before execution.
Reimplemented in SkinTemplate.
Definition at line 1459 of file Skin.php.
References $title, ContextSource\getConfig(), getContext(), ContextSource\getOutput(), getRelevantUser(), ContextSource\getRequest(), getTitle(), SpecialPage\getTitleFor(), getUser(), ContextSource\msg(), NS_CATEGORY, SpecialPage\setContext(), and showEmailUser().
Referenced by buildSidebar().
Skin::buildSidebar | ( | ) |
Build an array that represents the sidebar(s), the navigation bar among them.
BaseTemplate::getSidebar can be used to simplify the format and id generation in new skins.
The format of the returned array is [ heading => content, ... ], where:
Note that extensions can control the sidebar contents using the SkinBuildSidebar hook and can technically insert anything in here; skin creators are expected to handle values described above.
Stable to override
Definition at line 1637 of file Skin.php.
References addToSidebar(), buildFeedUrls(), buildNavUrls(), ContextSource\getConfig(), ContextSource\getLanguage(), getLanguages(), and makeToolbox().
|
static |
Skin::disclaimerLink | ( | ) |
Gets the link to the wiki's general disclaimers page.
Definition at line 1127 of file Skin.php.
References footerLink().
Referenced by getSiteFooterLinks().
Create a section edit link.
SecurityCheck-XSS $links has keys of different taint types
Title | $nt | The title being linked to (may not be the same as the current page, if the section is included from a template) |
string | $section | The designation of the section being pointed to, to be included in the link, like "§ion=$section" |
string | null | $tooltip | The tooltip to use for the link: will be escaped and wrapped in the 'editsectionhint' message |
Language | $lang | Language object |
Definition at line 1989 of file Skin.php.
References $lang, and ContextSource\msg().
|
protected |
Render the array as a series of links.
array | $tree | Categories tree returned by Title::getParentCategoryTree |
Definition at line 582 of file Skin.php.
References drawCategoryBrowser().
Referenced by drawCategoryBrowser(), and getCategoryLinks().
Skin::editUrlOptions | ( | ) |
Return URL options for the 'edit page' link.
This may include an 'oldid' specifier, if the current page view is such.
Definition at line 1138 of file Skin.php.
References ContextSource\getOutput().
Skin::footerLink | ( | $desc, | |
$page ) |
Returns an HTML link for use in the footer.
string | $desc | The i18n message key for the link text |
string | $page | The i18n message key for the page to link to |
Definition at line 1038 of file Skin.php.
References $title, footerLinkTitle(), and ContextSource\msg().
Referenced by aboutLink(), disclaimerLink(), and privacyLink().
|
private |
string | $desc | |
string | $page |
Definition at line 1056 of file Skin.php.
References $title, and ContextSource\msg().
Referenced by footerLink(), and preloadExistence().
|
protected |
Generate debug data HTML for displaying at the bottom of the main content area.
Definition at line 667 of file Skin.php.
References wfDeprecated().
Skin::getAfterPortlet | ( | string | $name | ) |
Allows extensions to hook into known portlets and add stuff to them.
Unlike its BaseTemplate counterpart, this method does not wrap the html provided by the hook in a div.
string | $name |
|
static |
Fetch the list of user-selectable skins in regards to $wgSkipSkins.
Useful for Special:Preferences and other places where you only want to show skins users can use.
Definition at line 78 of file Skin.php.
References $wgSkipSkins.
|
private |
Get a cached notice.
string | $name | Message name, or 'default' for $wgSiteNotice |
Definition at line 1904 of file Skin.php.
References $cache, ContextSource\getConfig(), ContextSource\getOutput(), and ContextSource\msg().
Referenced by getSiteNotice().
Skin::getCategories | ( | ) |
Definition at line 606 of file Skin.php.
References getCategoryLinks(), ContextSource\getOutput(), getTitle(), getUser(), and NS_CATEGORY.
Referenced by SkinMustache\getTemplateData().
Skin::getCategoryLinks | ( | ) |
Definition at line 510 of file Skin.php.
References $s, $t, $title, drawCategoryBrowser(), ContextSource\getConfig(), ContextSource\getOutput(), getTitle(), getUser(), ContextSource\msg(), and NS_CATEGORY.
Referenced by getCategories().
Skin::getCopyright | ( | $type = 'detect' | ) |
string | $type |
Definition at line 845 of file Skin.php.
References $title, $type, ContextSource\getConfig(), ContextSource\getOutput(), getTitle(), isRevisionCurrent(), Linker\makeExternalLink(), and ContextSource\msg().
|
protected |
Skin::getDefaultModules | ( | ) |
Defines the ResourceLoader modules that should be added to the skin It is recommended that skins wishing to override call parent::getDefaultModules() and substitute out any modules they wish to change by using a key to look them up.
Any modules defined with the 'styles' key will be added as render blocking CSS via Output::addModuleStyles. Similarly, each key should refer to a list of modules
Stable to override
Reimplemented in SkinVector.
Definition at line 191 of file Skin.php.
References $modules, ContextSource\getOutput(), and getUser().
|
static |
Get the query to generate a dynamic stylesheet.
Definition at line 428 of file Skin.php.
References wfDeprecated().
|
protected |
Skin::getHtmlElementAttributes | ( | ) |
Return values for <html> element.
Definition at line 489 of file Skin.php.
References $lang, and ContextSource\getLanguage().
Referenced by OutputPage\headElement().
|
protected |
Return an array of indicator data.
Can be used by subclasses but should not be extended.
array | $indicators | return value of OutputPage::getIndicators |
Definition at line 2130 of file Skin.php.
References $content.
Referenced by getIndicatorsHTML(), and SkinMustache\getTemplateData().
|
final |
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.
array | $indicators |
Definition at line 2108 of file Skin.php.
References getIndicatorsData().
Skin::getLanguages | ( | ) |
Generates array of language links for the current page.
This may includes items added to this section by the SidebarBeforeOutput hook (which may not necessarily be language links)
Definition at line 1353 of file Skin.php.
References ContextSource\getConfig(), ContextSource\getLanguage(), ContextSource\getOutput(), getTitle(), mapInterwikiToLanguage(), and ContextSource\msg().
Referenced by buildSidebar().
|
protected |
URL to the default square logo (1x key) Please use ResourceLoaderSkinModule::getAvailableLogos.
Definition at line 503 of file Skin.php.
References ResourceLoaderSkinModule\getAvailableLogos(), and ContextSource\getConfig().
Referenced by logoText().
Skin::getNewtalks | ( | ) |
Gets new talk page messages for the current user and returns an appropriate alert message (or an empty string if there are no messages)
Definition at line 1797 of file Skin.php.
References $revStore, ContextSource\getOutput(), getUser(), and ContextSource\msg().
Skin::getPageClasses | ( | $title | ) |
TODO: document.
Title | $title |
Definition at line 451 of file Skin.php.
References $title, $type, getPermissionManager(), and getUser().
Referenced by OutputPage\headElement().
|
final |
Create an array of personal tools items from the data in the quicktemplate stored by SkinTemplate.
The resulting array is built according to a format intended to be passed through makeListItem to generate the html. This is in reality the same list as already stored in personal_urls however it is reformatted so that you can just pass the individual items to makeListItem instead of hardcoding the element creation boilerplate.
array | $urls |
|
protected |
Gets the powered by MediaWiki icon.
Definition at line 918 of file Skin.php.
References ContextSource\getConfig().
Skin::getRelevantTitle | ( | ) |
Return the "relevant" title.
A "relevant" title is not necessarily the actual title of the page. Special pages like Special:MovePage use set the page they are acting on as their "relevant" title, this allows the skin system to display things such as content tabs which belong to to that page instead of displaying a basic special page tab which has almost no meaning.
Definition at line 356 of file Skin.php.
References getTitle().
Referenced by getRelevantUser(), and preloadExistence().
Skin::getRelevantUser | ( | ) |
Return the "relevant" user.
A "relevant" user is similar to a relevant title. Special pages like Special:Contributions mark the user which they are relevant to so that things like the toolbox can display the information they usually are only able to display on a user's userpage and talkpage.
Definition at line 377 of file Skin.php.
References $title, getRelevantTitle(), and NS_USER.
Referenced by buildNavUrls().
Skin::getRevisionId | ( | ) |
Get the current revision ID.
Definition at line 323 of file Skin.php.
References ContextSource\getOutput().
Referenced by lastModified().
|
protected |
Skin::getSiteFooterLinks | ( | ) |
Gets the link to the wiki's privacy policy, about page, and disclaimer page.
Definition at line 1076 of file Skin.php.
References aboutLink(), disclaimerLink(), ContextSource\getConfig(), and privacyLink().
Skin::getSiteNotice | ( | ) |
Get the site notice.
Definition at line 1953 of file Skin.php.
References getCachedNotice(), and getUser().
Referenced by SkinMustache\getTemplateData().
Skin::getSkinName | ( | ) |
Definition at line 168 of file Skin.php.
Referenced by OutputPage\headElement().
|
static |
Skin::getSkinStylePath | ( | $name | ) |
Return a fully resolved style path URL to images or styles stored in the current skin's folder.
This method returns a URL resolved using the configured skin style path.
Requires $stylename to be set, otherwise throws MWException.
string | $name | The name or path of a skin resource file |
MWException |
Definition at line 1177 of file Skin.php.
References ContextSource\getConfig().
Skin::getUndeleteLink | ( | ) |
Definition at line 719 of file Skin.php.
References $title, getContext(), ContextSource\getLanguage(), ContextSource\getRequest(), getTitle(), SpecialPage\getTitleFor(), getUser(), and ContextSource\msg().
Skin::initPage | ( | OutputPage | $out | ) |
Stable to override.
OutputPage | $out |
Reimplemented in SkinFallback.
Definition at line 176 of file Skin.php.
References preloadExistence().
Referenced by SkinTemplate\outputPage().
Skin::isRevisionCurrent | ( | ) |
Whether the revision displayed is the latest revision of the page.
Definition at line 333 of file Skin.php.
References ContextSource\getOutput().
Referenced by getCopyright().
|
protected |
Get the timestamp of the latest revision, formatted in user language.
Definition at line 941 of file Skin.php.
References $s, $t, ContextSource\getLanguage(), ContextSource\getOutput(), getRevisionId(), getUser(), and ContextSource\msg().
Skin::logoText | ( | $align = '' | ) |
string | $align |
Definition at line 972 of file Skin.php.
References getLogo(), and ContextSource\msg().
Skin::mainPageLink | ( | ) |
Gets the link to the wiki's main page.
Definition at line 1022 of file Skin.php.
References $s, and ContextSource\msg().
Skin::makeFooterIcon | ( | $icon, | |
$withImage = 'withImage' ) |
Renders a $wgFooterIcons icon according to the method's arguments.
array | $icon | The icon to build the html for, see $wgFooterIcons for the format of this array. |
bool | string | $withImage | Whether to use the icon's image or output a text-only footericon. |
Definition at line 995 of file Skin.php.
References ContextSource\getConfig().
|
static |
string | $name | |
string | array | $urlaction |
Definition at line 1236 of file Skin.php.
References $title, wfDeprecated(), and wfMessage().
|
static |
If url string starts with http, consider as external URL, else internal.
string | $name |
Definition at line 1261 of file Skin.php.
References wfUrlProtocols().
|
staticprotected |
|
final |
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...
string | $key | Usually a key from the list you are generating this link from. |
array | $item | Contains some of a specific set of keys. |
The text of the link will be generated either from the contents of the "text" key in the $item array, if a "msg" key is present a message by that name will be used, and if neither of those are set the $key will be used as a message name.
If a "href" key is not present makeLink will just output htmlescaped text. The "href", "id", "class", "rel", and "type" keys are used as attributes for the link if present.
If an "id" or "single-id" (if you don't want the actual id to be output on the link) is present it will be used to generate a tooltip and accesskey for the link.
The keys "context" and "primary" are ignored; these keys are used internally by skins and are not supposed to be included in the HTML output.
If you don't want an accesskey, set $item['tooltiponly'] = true;
If a "data" key is present, it must be an array, where the keys represent the data-xxx properties with their provided values. For example, $item['data'] = [ 'foo' => 1, 'bar' => 'baz', ]; will render as element properties: data-foo='1' data-bar='baz'
array | $options | Can be used to affect the output of a link. Possible options are:
|
Definition at line 2240 of file Skin.php.
References $title, ContextSource\msg(), Linker\titleAttrib(), and Linker\tooltipAndAccesskeyAttribs().
Referenced by makeListItem().
|
final |
Generates a list item for a navigation, portlet, portal, sidebar... list.
string | $key | Usually a key from the list you are generating this link from. |
array | $item | Array of list item data containing some of a specific set of keys. The "id", "class" and "itemtitle" keys will be used as attributes for the list item, if "active" contains a value of true a "active" class will also be appended to class. -param array{id?:string,class?:string,itemtitle?:string,active?:bool} $item |
array | $options | -param array{tag?:string} $options |
If you want something other than a "<li>" you can pass a tag name such as "tag" => "span" in the $options array to change the tag used. link/content data for the list item may come in one of two forms A "links" key may be used, in which case it should contain an array with a list of links to include inside the list item, see makeLink for the format of individual links array items.
Otherwise the relevant keys from the list item $item array will be passed to makeLink instead. Note however that "id" and "class" are used by the list item directly so they will not be passed to makeLink (however the link will still support a tooltip and accesskey from it) If you need an id or class on a single link you should include a "links" array with just one link item inside of it. You can also set "link-class" in $item to set a class on the link itself. If you want to add a title to the list item itself, you can set "itemtitle" to the value. $options is also passed on to makeLink calls
Definition at line 2349 of file Skin.php.
References makeLink().
|
static |
|
static |
this can be passed the NS number as defined in Language.php
string | $name | |
string | array | $urlaction | |
int | $namespace |
Definition at line 1277 of file Skin.php.
References $title, and wfDeprecated().
|
final |
string | $mode | representing the type of button wanted either go , fulltext or image |
array | $attrs | (optional) |
MWException | if bad value of $mode passed in |
Definition at line 2423 of file Skin.php.
References ContextSource\msg(), and Linker\tooltipAndAccesskeyAttribs().
|
final |
array | $attrs | (optional) will be passed to tooltipAndAccesskeyAttribs and decorate the resulting input |
Definition at line 2406 of file Skin.php.
References ContextSource\msg(), and Linker\tooltipAndAccesskeyAttribs().
|
static |
Make a URL for a Special Page using the given query and protocol.
If $proto is set to null, make a local URL. Otherwise, make a full URL with the protocol specified.
string | $name | Name of the Special page |
string | array | $urlaction | Query to append |
string | null | $proto | Protocol to use or null for a local URL |
Definition at line 1210 of file Skin.php.
References $title, and SpecialPage\getSafeTitleFor().
|
static |
string | $name | |
string | $subpage | |
string | array | $urlaction |
Definition at line 1225 of file Skin.php.
References $title, and SpecialPage\getSafeTitleFor().
Skin::makeToolbox | ( | $navUrls, | |
$feedUrls ) |
Create an array of common toolbox items from the data in the quicktemplate stored by SkinTemplate.
The resulting array is built according to a format intended to be passed through makeListItem to generate the html.
array | $navUrls | |
array | $feedUrls |
Definition at line 2043 of file Skin.php.
Referenced by buildSidebar().
|
static |
|
staticprotected |
|
static |
array | $data | |
string | null | $nonce | OutputPage->getCSP()->getNonce() |
Definition at line 412 of file Skin.php.
References ResourceLoader\makeConfigSetScript(), and ResourceLoader\makeInlineScript().
Skin::mapInterwikiToLanguage | ( | $code | ) |
Allows correcting the language of interlanguage links which, mostly due to legacy reasons, do not always match the standards compliant language tag.
string | $code |
Definition at line 1340 of file Skin.php.
References ContextSource\getConfig().
Referenced by getLanguages().
|
static |
Normalize a skin preference value to a form that can be loaded.
If a skin can't be found, it will fall back to the configured default ($wgDefaultSkin), or the hardcoded default ($wgFallbackSkin) if the default skin is unavailable too.
string | $key | 'monobook', 'vector', etc. |
Definition at line 103 of file Skin.php.
References $fallback, $wgDefaultSkin, and $wgFallbackSkin.
|
abstract |
Outputs the HTML generated by other functions.
Reimplemented in SkinTemplate.
|
protected |
Preload the existence of three commonly-requested pages in a single query.
Definition at line 275 of file Skin.php.
References $title, footerLinkTitle(), ContextSource\getConfig(), getRelevantTitle(), and getUser().
Referenced by initPage().
Skin::printSource | ( | ) |
Text with the permalink to the source page, usually shown on the footer of a printed page.
Stable to override
Definition at line 700 of file Skin.php.
References $title, ContextSource\getOutput(), getTitle(), ContextSource\msg(), and wfExpandIRI().
Referenced by SkinMustache\getTemplateData().
Skin::privacyLink | ( | ) |
Gets the link to the wiki's privacy policy page.
Definition at line 1111 of file Skin.php.
References footerLink().
Referenced by getSiteFooterLinks().
Skin::setRelevantTitle | ( | $t | ) |
Skin::setRelevantUser | ( | $u | ) |
Skin::setupSkinUserCss | ( | OutputPage | $out | ) |
Hook point for adding style modules to OutputPage.
OutputPage | $out | Legacy parameter, identical to $this->getOutput() |
Skin::showEmailUser | ( | $id | ) |
User | int | $id |
Definition at line 1153 of file Skin.php.
References getUser(), and SpecialEmailUser\validateTarget().
Referenced by buildNavUrls().
Skin::subPageSubtitle | ( | $out = null | ) |
OutputPage | null | $out | Defaults to $this->getOutput() if left as null |
Definition at line 779 of file Skin.php.
References $lang, $title, ContextSource\getLanguage(), ContextSource\getOutput(), and ContextSource\msg().
|
protected |
string Skin::$stylename = null |