36 private $templateParser =
null;
46 if ( $this->templateParser ===
null ) {
47 $this->templateParser =
new TemplateParser( $this->options[
'templateDirectory'] );
49 $this->templateParser->enableRecursivePartials(
true );
51 return $this->templateParser;
60 private function createTempUserBannerHTML() {
61 $isSupportedSkin = $this->
getOptions()[
'tempUserBanner'];
62 $isTempUser = $this->
getUser()->isTemp();
64 if ( !$isSupportedSkin || !$isTempUser ) {
68 $returntoParam = SkinComponentUtils::getReturnToParam(
79 return $tempUserBanner->getTemplateData()[
'html'];
92 $template = $this->options[
'template'] ??
'skin';
94 $html = $this->createTempUserBannerHTML();
95 $html .= $tp->processTemplate(
$template, $data );
105 return parent::doEditSectionLinksHTML( $links, $lang );
108 'class' =>
'mw-editsection',
109 'array-links' => $links
119 $printSource = Html::rawElement(
122 'class' =>
'printfooter',
123 'data-nosnippet' =>
''
127 $bodyContent = $out->getHTML() .
"\n" . $printSource;
131 $data = parent::getTemplateData() + [
136 'html-user-message' => $newTalksHtml ?
137 Html::rawElement(
'div', [
'class' =>
'usermessage' ], $newTalksHtml ) :
null,
139 'html-body-content' => $this->
wrapHTML( $out->getTitle(), $bodyContent ),
146 'link-mainpage' => Title::newMainPage()->getLocalURL(),
149 foreach ( $this->options[
'messages'] ?? [] as $message ) {
150 $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.
doEditSectionLinksHTML(array $links, Language $lang)
to override by skinsstring
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.