20use Wikimedia\WrappedStringList;
40 if ( $this->templateParser ===
null ) {
41 $this->templateParser =
new TemplateParser( $this->options[
'templateDirectory'] );
56 $template = $this->options[
'template'] ??
'skin';
62 $html = $out->headElement( $this );
64 $html .= $tp->processTemplate(
$template, $data );
86 $printSource = Html::rawElement(
'div', [
'class' =>
'printfooter' ], $this->
printSource() );
87 $bodyContent = $out->getHTML() .
"\n" . $printSource;
96 'html-title' => $out->getPageTitle(),
98 'html-body-content' => $this->
wrapHTML( $out->getTitle(), $bodyContent ),
115 'form-action' => $config->get(
'Script' ),
118 [
'id' =>
'mw-searchButton',
'class' =>
'searchButton mw-fallbackSearchButton' ]
122 [
'id' =>
'searchButton',
'class' =>
'searchButton' ]
125 'msg-search' => $this->
msg(
'search' )->text(),
141 MWDebug::getDebugHTML( $this ),
142 $this->bottomScripts(),
146 [
'id' =>
'mw-html-debug-log' ],
147 MWDebug::getHTMLDebugLog()
149 . Html::closeElement(
'body' )
150 . Html::closeElement(
'html' )
153 return WrappedStringList::join(
"\n", $tail );
wfReportTime( $nonce=null)
Returns a script tag that stores the amount of time it took MediaWiki to handle the request in millis...
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
Generic template for use with Mustache templates.
getTemplateData()
Subclasses may extend this method to add additional template data.
TemplateParser null $templateParser
tailElement( $out)
The final bits that go to the bottom of a page HTML document including the closing tags.
generateHTML()
Subclasses not wishing to use the QuickTemplate render method can rewrite this method,...
getTemplateParser()
Get the template parser, it will be lazily created if not already set.
Base class for template-based skins.
string $template
For QuickTemplate, the name of the subclass which will actually fill the template.
prepareUserLanguageAttributes()
Prepare user language attribute links.
wrapHTML( $title, $html)
Wrap the body text with language information and identifiable element.
setupTemplateContext()
Setup class properties that are necessary prior to calling setupTemplateForOutput.
prepareSubtitle()
Prepare the subtitle of the page for output in the skin if one has been set.
prepareUndeleteLink()
Prepare undelete link for output in page.
afterContentHook()
This runs a hook to allow extensions placing their stuff after content and article metadata (e....
getSiteNotice()
Get the site notice.
getIndicatorsData( $indicators)
Return an array of indicator data.
printSource()
Text with the permalink to the source page, usually shown on the footer of a printed page.
makeSearchInput( $attrs=[])
makeSearchButton( $mode, $attrs=[])
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name If you don't need a full Title object,...