MediaWiki 1.42.0-rc.0
SpecialEditRecovery.php
Go to the documentation of this file.
1<?php
7namespace MediaWiki\Specials;
8
11
16
17 public function __construct() {
18 parent::__construct( 'EditRecovery' );
19 }
20
21 protected function getGroupName() {
22 return 'changes';
23 }
24
28 public function execute( $subPage ) {
29 parent::execute( $subPage );
30 $this->addHelpLink( 'Help:Edit_Recovery' );
31 $this->getOutput()->addModuleStyles( 'mediawiki.special.editrecovery.styles' );
32 $this->getOutput()->addModules( 'mediawiki.special.editrecovery' );
33 $noJs = Html::element(
34 'span',
35 [ 'class' => 'error mw-EditRecovery-special-nojs-notice' ],
36 $this->msg( 'edit-recovery-nojs-placeholder' )
37 );
38 $placeholder = Html::rawElement( 'div', [ 'class' => 'mw-EditRecovery-special' ], $noJs );
39 $this->getOutput()->addHTML( $placeholder );
40 }
41}
This class is a collection of static functions that serve two purposes:
Definition Html.php:56
Parent class for all special pages.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
element(SerializerNode $parent, SerializerNode $node, $contents)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...