35 private $templateParser =
null;
45 if ( $this->templateParser ===
null ) {
46 $this->templateParser =
new TemplateParser( $this->options[
'templateDirectory'] );
48 $this->templateParser->enableRecursivePartials(
true );
50 return $this->templateParser;
59 private function createTempUserBannerHTML() {
60 $isSupportedSkin = $this->
getOptions()[
'tempUserBanner'];
61 $isTempUser = $this->
getUser()->isTemp();
63 if ( !$isSupportedSkin || !$isTempUser ) {
67 $returntoParam = SkinComponentUtils::getReturnToParam(
78 return $tempUserBanner->getTemplateData()[
'html'];
91 $template = $this->options[
'template'] ??
'skin';
93 $tempUserBannerHTML = $this->createTempUserBannerHTML();
98 $html = $out->headElement( $this );
100 $html .= $tempUserBannerHTML;
102 $html .= $tp->processTemplate(
$template, $data );
103 $html .= $out->tailElement( $this );
113 $printSource = Html::rawElement(
116 'class' =>
'printfooter',
117 'data-nosnippet' =>
''
121 $bodyContent = $out->getHTML() .
"\n" . $printSource;
125 $data = parent::getTemplateData() + [
130 'html-user-message' => $newTalksHtml ?
131 Html::rawElement(
'div', [
'class' =>
'usermessage' ], $newTalksHtml ) :
null,
133 'html-body-content' => $this->
wrapHTML( $out->getTitle(), $bodyContent ),
140 'link-mainpage' => Title::newMainPage()->getLocalURL(),
143 foreach ( $this->options[
'messages'] ?? [] as $message ) {
144 $data[
"msg-{$message}"] = $this->
msg( $message )->text();
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
getContext()
Get the base IContextSource object.
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...
getUserLanguageAttributes()
Get user language attribute links array.
getIndicatorsData( $indicators)
Return an array of indicator data.
getOptions()
Get current skin's options.
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.