33 private $templateParser =
null;
43 if ( $this->templateParser ===
null ) {
44 $this->templateParser =
new TemplateParser( $this->options[
'templateDirectory'] );
46 $this->templateParser->enableRecursivePartials(
true );
48 return $this->templateParser;
61 $template = $this->options[
'template'] ??
'skin';
67 $html = $out->headElement( $this );
69 $html .= $tp->processTemplate(
$template, $data );
70 $html .= $out->tailElement( $this );
80 $printSource = Html::rawElement(
83 'class' =>
'printfooter',
84 'data-nosnippet' =>
''
88 $bodyContent = $out->getHTML() .
"\n" . $printSource;
92 $data = parent::getTemplateData() + [
97 'html-user-message' => $newTalksHtml ?
98 Html::rawElement(
'div', [
'class' =>
'usermessage' ], $newTalksHtml ) :
null,
100 'html-body-content' => $this->
wrapHTML( $out->getTitle(), $bodyContent ),
107 'link-mainpage' => Title::newMainPage()->getLocalURL(),
110 foreach ( $this->options[
'messages'] ?? [] as $message ) {
111 $data[
"msg-{$message}"] = $this->
msg( $message )->text();
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
Generic template for use with Mustache templates.
getTemplateData()
to extend. Subclasses may extend this method to add additional template data. this method should neve...
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 QuickTemplate-based skins.
string $template
For QuickTemplate, the name of the subclass which will actually fill the template.
setupTemplateContext()
Setup class properties that are necessary prior to calling setupTemplateForOutput.
afterContentHook()
This runs a hook to allow extensions placing their stuff after content and article metadata (e....
prepareUndeleteLink()
Prepare undelete link for output in page.
getNewtalks()
Gets new talk page messages for the current user and returns an appropriate alert message (or an empt...
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.
prepareSubtitle(bool $withContainer=true)
Prepare the subtitle of the page for output in the skin if one has been set.
prepareUserLanguageAttributes()
Prepare user language attribute links.
wrapHTML( $title, $html)
Wrap the body text with language information and identifiable element.