[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Preparation for the final page rendering. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
File Size: | 3872 lines (118 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
OutputPage:: (170 methods):
__construct()
redirect()
getRedirect()
setStatusCode()
addMeta()
addLink()
addMetadataLink()
setCanonicalUrl()
getMetadataAttribute()
addScript()
addExtensionStyle()
getExtStyle()
addScriptFile()
addInlineScript()
getScript()
filterModules()
getModules()
addModules()
getModuleScripts()
addModuleScripts()
getModuleStyles()
addModuleStyles()
getModuleMessages()
addModuleMessages()
getTarget()
setTarget()
getHeadItemsArray()
getHeadItems()
addHeadItem()
hasHeadItem()
setETag()
setArticleBodyOnly()
getArticleBodyOnly()
setProperty()
getProperty()
checkLastModified()
setLastModified()
setRobotPolicy()
setIndexPolicy()
setFollowPolicy()
setPageTitleActionText()
getPageTitleActionText()
setHTMLTitle()
getHTMLTitle()
setRedirectedFrom()
setPageTitle()
getPageTitle()
setTitle()
setSubtitle()
appendSubtitle()
addSubtitle()
addBacklinkSubtitle()
clearSubtitle()
getSubtitle()
setPrintable()
isPrintable()
disable()
isDisabled()
showNewSectionLink()
forceHideNewSectionLink()
setSyndicated()
setFeedAppendQuery()
addFeedLink()
isSyndicated()
getSyndicationLinks()
getFeedAppendQuery()
setArticleFlag()
isArticle()
setArticleRelated()
isArticleRelated()
addLanguageLinks()
setLanguageLinks()
getLanguageLinks()
addCategoryLinks()
setCategoryLinks()
getCategoryLinks()
getCategories()
disallowUserJs()
getAllowedModules()
setAllowedModules()
reduceAllowedModules()
prependHTML()
addHTML()
addElement()
clearHTML()
getHTML()
parserOptions()
setRevisionId()
getRevisionId()
setRevisionTimestamp()
getRevisionTimestamp()
setFileVersion()
getFileVersion()
getTemplateIds()
getFileSearchOptions()
addWikiText()
addWikiTextWithTitle()
addWikiTextTitleTidy()
addWikiTextTidy()
addWikiTextTitle()
addParserOutputNoText()
addParserOutputMetadata()
addParserOutputContent()
addParserOutputText()
addParserOutput()
addTemplate()
parse()
parseInline()
setSquidMaxage()
enableClientCache()
getCacheVaryCookies()
haveCacheVaryCookies()
addVaryHeader()
getVaryHeader()
getXVO()
addAcceptLanguage()
preventClickjacking()
allowClickjacking()
getPreventClickjacking()
getFrameOptions()
sendCacheControl()
output()
out()
blockedPage()
prepareErrorPage()
showErrorPage()
showPermissionsErrorPage()
versionRequired()
permissionRequired()
loginToUse()
formatPermissionsErrorMessage()
readOnlyPage()
rateLimited()
showLagWarning()
showFatalError()
showUnexpectedValueError()
showFileCopyError()
showFileRenameError()
showFileDeleteError()
showFileNotFoundError()
addReturnTo()
returnToMain()
headElement()
getResourceLoader()
makeResourceLoaderLink()
getHtmlFromLoaderLinks()
getHeadScripts()
getScriptsForBottomQueue()
getBottomScripts()
getJsConfigVars()
addJsConfigVars()
getJSVars()
userCanPreview()
getHeadLinksArray()
getHeadLinks()
feedLink()
addStyle()
addInlineStyle()
buildCssLinks()
buildCssLinksArray()
styleLink()
transformCssMedia()
addWikiMsg()
addWikiMsgArray()
wrapWikiMsg()
includeJQuery()
enableTOC()
isTOCEnabled()
enableSectionEditLinks()
sectionEditLinksEnabled()
Class: OutputPage - X-Ref
This class should be covered by a general architecture document which does__construct( IContextSource $context = null ) X-Ref |
Constructor for OutputPage. This should not be called directly. Instead a new RequestContext should be created and it will implicitly create a OutputPage tied to that context. param: IContextSource|null $context |
redirect( $url, $responsecode = '302' ) X-Ref |
Redirect to $url rather than displaying the normal page param: string $url URL param: string $responsecode HTTP status code |
getRedirect() X-Ref |
Get the URL to redirect to, or an empty string if not redirect URL set return: string |
setStatusCode( $statusCode ) X-Ref |
Set the HTTP status code to send with the output. param: int $statusCode |
addMeta( $name, $val ) X-Ref |
Add a new "<meta>" tag To add an http-equiv meta tag, precede the name with "http:" param: string $name Tag name param: string $val Tag value |
addLink( array $linkarr ) X-Ref |
Add a new \<link\> tag to the page header. Note: use setCanonicalUrl() for rel=canonical. param: array $linkarr Associative array of attributes. |
addMetadataLink( array $linkarr ) X-Ref |
Add a new \<link\> with "rel" attribute set to "meta" param: array $linkarr Associative array mapping attribute names to their |
setCanonicalUrl( $url ) X-Ref |
Set the URL to be used for the <link rel=canonical>. This should be used in preference to addLink(), to avoid duplicate link tags. param: string $url |
getMetadataAttribute() X-Ref |
Get the value of the "rel" attribute for metadata links return: string |
addScript( $script ) X-Ref |
Add raw HTML to the list of scripts (including \<script\> tag, etc.) param: string $script Raw HTML |
addExtensionStyle( $url ) X-Ref |
Register and add a stylesheet from an extension directory. param: string $url Path to sheet. Provide either a full url (beginning |
getExtStyle() X-Ref |
Get all styles added by extensions return: array |
addScriptFile( $file, $version = null ) X-Ref |
Add a JavaScript file out of skins/common, or a given relative path. param: string $file Filename in skins/common or complete on-server path param: string $version Style version of the file. Defaults to $wgStyleVersion |
addInlineScript( $script ) X-Ref |
Add a self-contained script tag with the given contents param: string $script JavaScript text, no "<script>" tags |
getScript() X-Ref |
Get all registered JS and CSS tags for the header. return: string |
filterModules( array $modules, $position = null,$type = ResourceLoaderModule::TYPE_COMBINED) X-Ref |
Filter an array of modules to remove insufficiently trustworthy members, and modules which are no longer registered (eg a page is cached before an extension is disabled) param: array $modules param: string|null $position If not null, only return modules with this position param: string $type return: array |
getModules( $filter = false, $position = null, $param = 'mModules' ) X-Ref |
Get the list of modules to include on this page param: bool $filter Whether to filter out insufficiently trustworthy modules param: string|null $position If not null, only return modules with this position param: string $param return: array Array of module names |
addModules( $modules ) X-Ref |
Add one or more modules recognized by the resource loader. Modules added through this function will be loaded by the resource loader when the page loads. param: string|array $modules Module name (string) or array of module names |
getModuleScripts( $filter = false, $position = null ) X-Ref |
Get the list of module JS to include on this page param: bool $filter param: string|null $position return: array Array of module names |
addModuleScripts( $modules ) X-Ref |
Add only JS of one or more modules recognized by the resource loader. Module scripts added through this function will be loaded by the resource loader when the page loads. param: string|array $modules Module name (string) or array of module names |
getModuleStyles( $filter = false, $position = null ) X-Ref |
Get the list of module CSS to include on this page param: bool $filter param: string|null $position return: array Array of module names |
addModuleStyles( $modules ) X-Ref |
Add only CSS of one or more modules recognized by the resource loader. Module styles added through this function will be added using standard link CSS tags, rather than as a combined Javascript and CSS package. Thus, they will load when JavaScript is disabled (unless CSS also happens to be disabled). param: string|array $modules Module name (string) or array of module names |
getModuleMessages( $filter = false, $position = null ) X-Ref |
Get the list of module messages to include on this page param: bool $filter param: string|null $position return: array Array of module names |
addModuleMessages( $modules ) X-Ref |
Add only messages of one or more modules recognized by the resource loader. Module messages added through this function will be loaded by the resource loader when the page loads. param: string|array $modules Module name (string) or array of module names |
getTarget() X-Ref |
return: null|string ResourceLoader target |
setTarget( $target ) X-Ref |
Sets ResourceLoader target for load.php links. If null, will be omitted param: string|null $target |
getHeadItemsArray() X-Ref |
Get an array of head items return: array |
getHeadItems() X-Ref |
Get all header items in a string return: string |
addHeadItem( $name, $value ) X-Ref |
Add or replace an header item to the output param: string $name Item name param: string $value Raw HTML |
hasHeadItem( $name ) X-Ref |
Check if the header item $name is already set param: string $name Item name return: bool |
setETag( $tag ) X-Ref |
Set the value of the ETag HTTP header, only used if $wgUseETag is true param: string $tag Value of "ETag" header |
setArticleBodyOnly( $only ) X-Ref |
Set whether the output should only contain the body of the article, without any skin, sidebar, etc. Used e.g. when calling with "action=render". param: bool $only Whether to output only the body of the article |
getArticleBodyOnly() X-Ref |
Return whether the output will contain only the body of the article return: bool |
setProperty( $name, $value ) X-Ref |
Set an additional output property param: string $name param: mixed $value |
getProperty( $name ) X-Ref |
Get an additional output property param: string $name return: mixed Property value or null if not found |
checkLastModified( $timestamp ) X-Ref |
checkLastModified tells the client to use the client-cached page if possible. If successful, the OutputPage is disabled so that any future call to OutputPage->output() have no effect. Side effect: sets mLastModified for Last-Modified header param: string $timestamp return: bool True if cache-ok headers was sent. |
setLastModified( $timestamp ) X-Ref |
Override the last modified timestamp param: string $timestamp New timestamp, in a format readable by |
setRobotPolicy( $policy ) X-Ref |
Set the robot policy for the page: <http://www.robotstxt.org/meta.html> param: string $policy The literal string to output as the contents of return: null |
setIndexPolicy( $policy ) X-Ref |
Set the index policy for the page, but leave the follow policy un- touched. param: string $policy Either 'index' or 'noindex'. return: null |
setFollowPolicy( $policy ) X-Ref |
Set the follow policy for the page, but leave the index policy un- touched. param: string $policy Either 'follow' or 'nofollow'. return: null |
setPageTitleActionText( $text ) X-Ref |
Set the new value of the "action text", this will be added to the "HTML title", separated from it with " - ". param: string $text New value of the "action text" |
getPageTitleActionText() X-Ref |
Get the value of the "action text" return: string |
setHTMLTitle( $name ) X-Ref |
"HTML title" means the contents of "<title>". It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file. param: string|Message $name |
getHTMLTitle() X-Ref |
Return the "HTML title", i.e. the content of the "<title>" tag. return: string |
setRedirectedFrom( $t ) X-Ref |
Set $mRedirectedFrom, the Title of the page which redirected us to the current page. param: Title $t |
setPageTitle( $name ) X-Ref |
"Page title" means the contents of \<h1\>. It is stored as a valid HTML fragment. This function allows good tags like \<sup\> in the \<h1\> tag, but not bad tags like \<script\>. This function automatically sets \<title\> to the same content as \<h1\> but with all tags removed. Bad tags that were escaped in \<h1\> will still be escaped in \<title\>, and good tags like \<i\> will be dropped entirely. param: string|Message $name |
getPageTitle() X-Ref |
Return the "page title", i.e. the content of the \<h1\> tag. return: string |
setTitle( Title $t ) X-Ref |
Set the Title object to use param: Title $t |
setSubtitle( $str ) X-Ref |
Replace the subtitle with $str param: string|Message $str New value of the subtitle. String should be safe HTML. |
appendSubtitle( $str ) X-Ref |
Add $str to the subtitle param: string|Message $str String or Message to add to the subtitle |
addSubtitle( $str ) X-Ref |
Add $str to the subtitle param: string|Message $str String or Message to add to the subtitle. String should be safe HTML. |
addBacklinkSubtitle( Title $title, $query = array() X-Ref |
Add a subtitle containing a backlink to a page param: Title $title Title to link to param: array $query Array of additional parameters to include in the link |
clearSubtitle() X-Ref |
Clear the subtitles |
getSubtitle() X-Ref |
Get the subtitle return: string |
setPrintable() X-Ref |
Set the page as printable, i.e. it'll be displayed with with all print styles included |
isPrintable() X-Ref |
Return whether the page is "printable" return: bool |
disable() X-Ref |
Disable output completely, i.e. calling output() will have no effect |
isDisabled() X-Ref |
Return whether the output will be completely disabled return: bool |
showNewSectionLink() X-Ref |
Show an "add new section" link? return: bool |
forceHideNewSectionLink() X-Ref |
Forcibly hide the new section link? return: bool |
setSyndicated( $show = true ) X-Ref |
Add or remove feed links in the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version param: bool $show True: add default feeds, false: remove all feeds |
setFeedAppendQuery( $val ) X-Ref |
Add default feeds to the page header This is mainly kept for backward compatibility, see OutputPage::addFeedLink() for the new version param: string $val Query to append to feed links or false to output |
addFeedLink( $format, $href ) X-Ref |
Add a feed link to the page header param: string $format Feed type, should be a key of $wgFeedClasses param: string $href URL |
isSyndicated() X-Ref |
Should we output feed links for this page? return: bool |
getSyndicationLinks() X-Ref |
Return URLs for each supported syndication format for this page. return: array Associating format keys with URLs |
getFeedAppendQuery() X-Ref |
Will currently always return null return: null |
setArticleFlag( $v ) X-Ref |
Set whether the displayed content is related to the source of the corresponding article on the wiki Setting true will cause the change "article related" toggle to true param: bool $v |
isArticle() X-Ref |
Return whether the content displayed page is related to the source of the corresponding article on the wiki return: bool |
setArticleRelated( $v ) X-Ref |
Set whether this page is related an article on the wiki Setting false will cause the change of "article flag" toggle to false param: bool $v |
isArticleRelated() X-Ref |
Return whether this page is related an article on the wiki return: bool |
addLanguageLinks( array $newLinkArray ) X-Ref |
Add new language links param: array $newLinkArray Associative array mapping language code to the page |
setLanguageLinks( array $newLinkArray ) X-Ref |
Reset the language links and add new language links param: array $newLinkArray Associative array mapping language code to the page |
getLanguageLinks() X-Ref |
Get the list of language links return: array Array of Interwiki Prefixed (non DB key) Titles (e.g. 'fr:Test page') |
addCategoryLinks( array $categories ) X-Ref |
Add an array of categories, with names in the keys param: array $categories Mapping category name => sort key |
setCategoryLinks( array $categories ) X-Ref |
Reset the category links (but not the category list) and add $categories param: array $categories Mapping category name => sort key |
getCategoryLinks() X-Ref |
Get the list of category links, in a 2-D array with the following format: $arr[$type][] = $link, where $type is either "normal" or "hidden" (for hidden categories) and $link a HTML fragment with a link to the category page return: array |
getCategories() X-Ref |
Get the list of category names this page belongs to return: array Array of strings |
disallowUserJs() X-Ref |
Do not allow scripts which can be modified by wiki users to load on this page; only allow scripts bundled with, or generated by, the software. Site-wide styles are controlled by a config setting, since they can be used to create a custom skin/theme, but not user-specific ones. |
getAllowedModules( $type ) X-Ref |
Show what level of JavaScript / CSS untrustworthiness is allowed on this page param: string $type ResourceLoaderModule TYPE_ constant return: int ResourceLoaderModule ORIGIN_ class constant |
setAllowedModules( $type, $level ) X-Ref |
Set the highest level of CSS/JS untrustworthiness allowed param: string $type ResourceLoaderModule TYPE_ constant param: int $level ResourceLoaderModule class constant |
reduceAllowedModules( $type, $level ) X-Ref |
Limit the highest level of CSS/JS untrustworthiness allowed. If passed the same or a higher level than the current level of untrustworthiness set, the level will remain unchanged. param: string $type param: int $level ResourceLoaderModule class constant |
prependHTML( $text ) X-Ref |
Prepend $text to the body HTML param: string $text HTML |
addHTML( $text ) X-Ref |
Append $text to the body HTML param: string $text HTML |
addElement( $element, array $attribs = array() X-Ref |
Shortcut for adding an Html::element via addHTML. param: string $element param: array $attribs param: string $contents |
clearHTML() X-Ref |
Clear the body HTML |
getHTML() X-Ref |
Get the body HTML return: string HTML |
parserOptions( $options = null ) X-Ref |
Get/set the ParserOptions object to use for wikitext parsing param: ParserOptions|null $options Either the ParserOption to use or null to only get the return: ParserOptions |
setRevisionId( $revid ) X-Ref |
Set the revision ID which will be seen by the wiki text parser for things such as embedded {{REVISIONID}} variable use. param: int|null $revid An positive integer, or null return: mixed Previous value |
getRevisionId() X-Ref |
Get the displayed revision ID return: int |
setRevisionTimestamp( $timestamp ) X-Ref |
Set the timestamp of the revision which will be displayed. This is used to avoid a extra DB call in Skin::lastModified(). param: string|null $timestamp return: mixed Previous value |
getRevisionTimestamp() X-Ref |
Get the timestamp of displayed revision. This will be null if not filled by setRevisionTimestamp(). return: string|null |
setFileVersion( $file ) X-Ref |
Set the displayed file version param: File|bool $file return: mixed Previous value |
getFileVersion() X-Ref |
Get the displayed file version return: array|null ('time' => MW timestamp, 'sha1' => sha1) |
getTemplateIds() X-Ref |
Get the templates used on this page return: array (namespace => dbKey => revId) |
getFileSearchOptions() X-Ref |
Get the files used on this page return: array (dbKey => array('time' => MW timestamp or null, 'sha1' => sha1 or '')) |
addWikiText( $text, $linestart = true, $interface = true ) X-Ref |
Convert wikitext to HTML and add it to the buffer Default assumes that the current page title will be used. param: string $text param: bool $linestart Is this the start of a line? param: bool $interface Is this text in the user interface language? |
addWikiTextWithTitle( $text, &$title, $linestart = true ) X-Ref |
Add wikitext with a custom Title object param: string $text Wikitext param: Title $title param: bool $linestart Is this the start of a line? |
addWikiTextTitleTidy( $text, &$title, $linestart = true ) X-Ref |
Add wikitext with a custom Title object and tidy enabled. param: string $text Wikitext param: Title $title param: bool $linestart Is this the start of a line? |
addWikiTextTidy( $text, $linestart = true ) X-Ref |
Add wikitext with tidy enabled param: string $text Wikitext param: bool $linestart Is this the start of a line? |
addWikiTextTitle( $text, Title $title, $linestart,$tidy = false, $interface = false) X-Ref |
Add wikitext with a custom Title object param: string $text Wikitext param: Title $title param: bool $linestart Is this the start of a line? param: bool $tidy Whether to use tidy param: bool $interface Whether it is an interface message |
addParserOutputNoText( $parserOutput ) X-Ref |
Add a ParserOutput object, but without Html. param: ParserOutput $parserOutput |
addParserOutputMetadata( $parserOutput ) X-Ref |
Add all metadata associated with a ParserOutput object, but without the actual HTML. This includes categories, language links, ResourceLoader modules, effects of certain magic words, and so on. param: ParserOutput $parserOutput |
addParserOutputContent( $parserOutput ) X-Ref |
Add the HTML and enhancements for it (like ResourceLoader modules) associated with a ParserOutput object, without any other metadata. param: ParserOutput $parserOutput |
addParserOutputText( $parserOutput ) X-Ref |
Add the HTML associated with a ParserOutput object, without any metadata. param: ParserOutput $parserOutput |
addParserOutput( $parserOutput ) X-Ref |
Add everything from a ParserOutput object. param: ParserOutput $parserOutput |
addTemplate( &$template ) X-Ref |
Add the output of a QuickTemplate to the output buffer param: QuickTemplate $template |
parse( $text, $linestart = true, $interface = false, $language = null ) X-Ref |
Parse wikitext and return the HTML. param: string $text param: bool $linestart Is this the start of a line? param: bool $interface Use interface language ($wgLang instead of param: Language $language Target language object, will override $interface return: string HTML |
parseInline( $text, $linestart = true, $interface = false ) X-Ref |
Parse wikitext, strip paragraphs, and return the HTML. param: string $text param: bool $linestart Is this the start of a line? param: bool $interface Use interface language ($wgLang instead of return: string HTML |
setSquidMaxage( $maxage ) X-Ref |
Set the value of the "s-maxage" part of the "Cache-control" HTTP header param: int $maxage Maximum cache time on the Squid, in seconds. |
enableClientCache( $state ) X-Ref |
Use enableClientCache(false) to force it to send nocache headers param: bool $state return: bool |
getCacheVaryCookies() X-Ref |
Get the list of cookies that will influence on the cache return: array |
haveCacheVaryCookies() X-Ref |
Check if the request has a cache-varying cookie header If it does, it's very important that we don't allow public caching return: bool |
addVaryHeader( $header, $option = null ) X-Ref |
Add an HTTP header that will influence on the cache param: string $header Header name param: array|null $option |
getVaryHeader() X-Ref |
Return a Vary: header on which to vary caches. Based on the keys of $mVaryHeader, such as Accept-Encoding or Cookie return: string |
getXVO() X-Ref |
Get a complete X-Vary-Options header return: string |
addAcceptLanguage() X-Ref |
bug 21672: Add Accept-Language to Vary and XVO headers if there's no 'variant' parameter existed in GET. For example: /w/index.php?title=Main_page should always be served; but /w/index.php?title=Main_page&variant=zh-cn should never be served. |
preventClickjacking( $enable = true ) X-Ref |
Set a flag which will cause an X-Frame-Options header appropriate for edit pages to be sent. The header value is controlled by $wgEditPageFrameOptions. This is the default for special pages. If you display a CSRF-protected form on an ordinary view page, then you need to call this function. param: bool $enable |
allowClickjacking() X-Ref |
Turn off frame-breaking. Alias for $this->preventClickjacking(false). This can be called from pages which do not contain any CSRF-protected HTML form. |
getPreventClickjacking() X-Ref |
Get the prevent-clickjacking flag return: bool |
getFrameOptions() X-Ref |
Get the X-Frame-Options header value (without the name part), or false if there isn't one. This is used by Skin to determine whether to enable JavaScript frame-breaking, for clients that don't support X-Frame-Options. return: string |
sendCacheControl() X-Ref |
Send cache control HTTP headers |
output() X-Ref |
Finally, all the text has been munged and accumulated into the object, let's actually output it: |
out( $ins ) X-Ref |
Actually output something with print. param: string $ins The string to output |
blockedPage() X-Ref |
Produce a "user is blocked" page. |
prepareErrorPage( $pageTitle, $htmlTitle = false ) X-Ref |
Prepare this object to display an error page; disable caching and indexing, clear the current text and redirect, set the page's title and optionally an custom HTML title (content of the "<title>" tag). param: string|Message $pageTitle Will be passed directly to setPageTitle() param: string|Message $htmlTitle Will be passed directly to setHTMLTitle(); |
showErrorPage( $title, $msg, $params = array() X-Ref |
Output a standard error page showErrorPage( 'titlemsg', 'pagetextmsg' ); showErrorPage( 'titlemsg', 'pagetextmsg', array( 'param1', 'param2' ) ); showErrorPage( 'titlemsg', $messageObject ); showErrorPage( $titleMessageObject, $messageObject ); param: string|Message $title Message key (string) for page title, or a Message object param: string|Message $msg Message key (string) for page text, or a Message object param: array $params Message parameters; ignored if $msg is a Message object |
showPermissionsErrorPage( array $errors, $action = null ) X-Ref |
Output a standard permission error page param: array $errors Error message keys param: string $action Action that was denied or null if unknown |
versionRequired( $version ) X-Ref |
Display an error page indicating that a given version of MediaWiki is required to use it param: mixed $version The version of MediaWiki needed to use the page |
permissionRequired( $permission ) X-Ref |
Display an error page noting that a given permission bit is required. param: string $permission Key required |
loginToUse() X-Ref |
Produce the stock "please login to use the wiki" page |
formatPermissionsErrorMessage( array $errors, $action = null ) X-Ref |
Format a list of error messages param: array $errors Array of arrays returned by Title::getUserPermissionsErrors param: string $action Action that was denied or null if unknown return: string The wikitext error-messages, formatted into a list. |
readOnlyPage( $source = null, $protected = false,array $reasons = array() X-Ref |
Display a page stating that the Wiki is in read-only mode, and optionally show the source of the page that the user was trying to edit. Should only be called (for this purpose) after wfReadOnly() has returned true. For historical reasons, this function is _also_ used to show the error message when a user tries to edit a page they are not allowed to edit. (Unless it's because they're blocked, then we show blockedPage() instead.) In this case, the second parameter should be set to true and a list of reasons supplied as the third parameter. param: string $source Source code to show (or null). param: bool $protected Is this a permissions error? param: array $reasons List of reasons for this error, as returned by param: string $action Action that was denied or null if unknown |
rateLimited() X-Ref |
Turn off regular page output and return an error response for when rate limiting has triggered. |
showLagWarning( $lag ) X-Ref |
Show a warning about slave lag If the lag is higher than $wgSlaveLagCritical seconds, then the warning is a bit more obvious. If the lag is lower than $wgSlaveLagWarning, then no warning is shown. param: int $lag Slave lag |
showFatalError( $message ) X-Ref |
No description |
showUnexpectedValueError( $name, $val ) X-Ref |
No description |
showFileCopyError( $old, $new ) X-Ref |
No description |
showFileRenameError( $old, $new ) X-Ref |
No description |
showFileDeleteError( $name ) X-Ref |
No description |
showFileNotFoundError( $name ) X-Ref |
No description |
addReturnTo( $title, array $query = array() X-Ref |
Add a "return to" link pointing to a specified title param: Title $title Title to link param: array $query Query string parameters param: string $text Text of the link (input is not escaped) param: array $options Options array to pass to Linker |
returnToMain( $unused = null, $returnto = null, $returntoquery = null ) X-Ref |
Add a "return to" link pointing to a specified title, or the title indicated in the request, or else the main page param: mixed $unused param: Title|string $returnto Title or String to return to param: string $returntoquery Query string for the return to link |
headElement( Skin $sk, $includeStyle = true ) X-Ref |
param: Skin $sk The given Skin param: bool $includeStyle Unused return: string The doctype, opening "<html>", and head element. |
getResourceLoader() X-Ref |
Get a ResourceLoader object associated with this OutputPage return: ResourceLoader |
makeResourceLoaderLink( $modules, $only, $useESI = false,array $extraQuery = array() X-Ref |
param: array|string $modules One or more module names param: string $only ResourceLoaderModule TYPE_ class constant param: bool $useESI param: array $extraQuery Array with extra query parameters to add to each param: bool $loadCall If true, output an (asynchronous) mw.loader.load() return: string The html "<script>", "<link>" and "<style>" tags |
getHtmlFromLoaderLinks( array $links ) X-Ref |
Build html output from an array of links from makeResourceLoaderLink. param: array $links return: string HTML |
getHeadScripts() X-Ref |
JS stuff to put in the "<head>". This is the startup module, config vars and modules marked with position 'top' return: string HTML fragment |
getScriptsForBottomQueue( $inHead ) X-Ref |
JS stuff to put at the 'bottom', which can either be the bottom of the "<body>" or the bottom of the "<head>" depending on $wgResourceLoaderExperimentalAsyncLoading: modules marked with position 'bottom', legacy scripts ($this->mScripts), user preferences, site JS and user JS. param: bool $inHead If true, this HTML goes into the "<head>", return: string |
getBottomScripts() X-Ref |
JS stuff to put at the bottom of the "<body>" return: string |
getJsConfigVars() X-Ref |
Get the javascript config vars to include on this page return: array Array of javascript config vars |
addJsConfigVars( $keys, $value = null ) X-Ref |
Add one or more variables to be set in mw.config in JavaScript param: string|array $keys Key or array of key/value pairs param: mixed $value [optional] Value of the configuration variable |
getJSVars() X-Ref |
Get an array containing the variables to be set in mw.config in JavaScript. Do not add things here which can be evaluated in ResourceLoaderStartUpModule - in other words, page-independent/site-wide variables (without state). You will only be adding bloat to the html page and causing page caches to have to be purged on configuration changes. return: array |
userCanPreview() X-Ref |
To make it harder for someone to slip a user a fake user-JavaScript or user-CSS preview, a random token is associated with the login session. If it's not passed back with the preview request, we won't render the code. return: bool |
getHeadLinksArray() X-Ref |
return: array Array in format "link name or number => 'link html'". |
getHeadLinks() X-Ref |
return: string HTML tag links to be put in the header. |
feedLink( $type, $url, $text ) X-Ref |
Generate a "<link rel/>" for a feed. param: string $type Feed type param: string $url URL to the feed param: string $text Value of the "title" attribute return: string HTML fragment |
addStyle( $style, $media = '', $condition = '', $dir = '' ) X-Ref |
Add a local or specified stylesheet, with the given media options. Meant primarily for internal use... param: string $style URL to the file param: string $media To specify a media type, 'screen', 'printable', 'handheld' or any. param: string $condition For IE conditional comments, specifying an IE version param: string $dir Set to 'rtl' or 'ltr' for direction-specific sheets |
addInlineStyle( $style_css, $flip = 'noflip' ) X-Ref |
Adds inline CSS styles param: mixed $style_css Inline CSS param: string $flip Set to 'flip' to flip the CSS if needed |
buildCssLinks() X-Ref |
Build a set of "<link>" elements for the stylesheets specified in the $this->styles array. These will be applied to various media & IE conditionals. return: string |
buildCssLinksArray() X-Ref |
return: array |
styleLink( $style, array $options ) X-Ref |
Generate \<link\> tags for stylesheets param: string $style URL to the file param: array $options Option, can contain 'condition', 'dir', 'media' keys return: string HTML fragment |
transformCssMedia( $media ) X-Ref |
Transform "media" attribute based on request parameters param: string $media Current value of the "media" attribute return: string Modified value of the "media" attribute, or null to skip |
addWikiMsg( ) X-Ref |
Add a wikitext-formatted message to the output. This is equivalent to: $wgOut->addWikiText( wfMessage( ... )->plain() ) |
addWikiMsgArray( $name, $args ) X-Ref |
Add a wikitext-formatted message to the output. Like addWikiMsg() except the parameters are taken as an array instead of a variable argument list. param: string $name param: array $args |
wrapWikiMsg( $wrap ) X-Ref |
This function takes a number of message/argument specifications, wraps them in some overall structure, and then parses the result and adds it to the output. In the $wrap, $1 is replaced with the first message, $2 with the second, and so on. The subsequent arguments may either be strings, in which case they are the message names, or arrays, in which case the first element is the message name, and subsequent elements are the parameters to that message. Don't use this for messages that are not in users interface language. For example: $wgOut->wrapWikiMsg( "<div class='error'>\n$1\n</div>", 'some-error' ); Is equivalent to: $wgOut->addWikiText( "<div class='error'>\n" . wfMessage( 'some-error' )->plain() . "\n</div>" ); The newline after opening div is needed in some wikitext. See bug 19226. param: string $wrap |
includeJQuery( array $modules = array() X-Ref |
Include jQuery core. Use this to avoid loading it multiple times before we get a usable script loader. param: array $modules List of jQuery modules which should be loaded return: array The list of modules which were not loaded. |
enableTOC( $flag = true ) X-Ref |
Enables/disables TOC, doesn't override __NOTOC__ param: bool $flag |
isTOCEnabled() X-Ref |
return: bool |
enableSectionEditLinks( $flag = true ) X-Ref |
Enables/disables section edit links, doesn't override __NOEDITSECTION__ param: bool $flag |
sectionEditLinksEnabled() X-Ref |
return: bool |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |