Manual:OutputPage.php

The  object takes care of generating HTML and other things related to creating a HTML-view of a page. It will also generate the  element for non-SkinTemplate skins or part of it for SkinTemplate based skins.

An instance of this class is located in $wgOut.

Output HTML

 * : called from function  in Wiki.php. It calls function   in Skin.php.
 * : called from function  in Skin.php a number of times to send the HTML to the user: $mBodytext and HTML before and after it.

Generate HTML

 * : parses wikitext and adds it to the HTML stored in that object. There are also variants of this function to choose the Title used to parse the wikitext or to choose whether the html should be parsed with HTML tidy.
 * (since 1.12.0): adds the content of the message to the HTML after parsing it.
 * : prepends $text (HTML) to the body HTML.
 * (deprecated, use ) which:
 * applies function  in Parser.php to the wikitext $text, resulting in the HTML text $text
 * applies function  to the HTML text $text, which:
 * applies function  to $text, which appends $text to $mBodytext.

JavaScript and CSS

 * : adds one or more variables to be set in  in JavaScript. $keys can be an array of key/value pairs. If $keys is a string it is used as key and $value must be set to the value.
 * : add a self-contained script tag with the given contents.
 * : 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. $modules can be a module name (string) or an array of module names.
 * : The same, but for CSS.
 * : 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. For security reasons scripts which can be modified by users should not be loaded on some pages, for example a login page.

Other functions

 * : set the title to use to the Title object $title.
 * : sets the contents of &lt;h1&gt; and &lt;title&gt; to $name. $name can either be a String or a Message object. When $name is a Message object, the text of this message is used.
 * : gets the page title (the contents of &lt;h1&gt; and &lt;title&gt;) as string.
 * : set the contents of &lt;title&gt;. It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file.
 * : sets the robot policy for the page. See http://www.robotstxt.org/meta.html.
 * : redirect to $url rather than displaying the normal page. $responsecode defaults to 302.
 * : get the URL to redirect to, or an empty string if not redirect URL set.
 * : sets a HEAD item.
 * : adds one (if $text is a string) or more (if $text is an array) keywords to the page header.
 * : adds a "return to" link pointing to a specified title. $title is the Title object to link to. $query is an optional query string and $text the text of the link (input is not escaped).
 * : adds the output of a QuickTemplate to the output buffer.
 * : turn off frame-breaking. See Clickjacking.
 * : Adds $text to the debug output.
 * : get the list of category names this page belongs to.
 * : is the content of the displayed page related to the source of the corresponding article on the wiki?
 * : is this page related to an article on the wiki?
 * : set the value of the "s-maxage" part of the "Cache-control" HTTP header. $maxages is the maximum cache time on the Squid, in seconds.