MediaWiki  1.29.1
SpecialAllMessages.php
Go to the documentation of this file.
1 <?php
34  protected $table;
35 
39  public function __construct() {
40  parent::__construct( 'Allmessages' );
41  }
42 
48  public function execute( $par ) {
49  $request = $this->getRequest();
50  $out = $this->getOutput();
51 
52  $this->setHeaders();
53 
54  if ( !$this->getConfig()->get( 'UseDatabaseMessages' ) ) {
55  $out->addWikiMsg( 'allmessagesnotsupportedDB' );
56 
57  return;
58  }
59 
60  $this->outputHeader( 'allmessagestext' );
61  $out->addModuleStyles( 'mediawiki.special' );
62  $this->addHelpLink( 'Help:System message' );
63 
64  $this->table = new AllMessagesTablePager(
65  $this,
66  [],
67  wfGetLangObj( $request->getVal( 'lang', $par ) )
68  );
69 
70  $out->addHTML( $this->table->buildForm() );
71  $out->addParserOutputContent( $this->table->getFullOutput() );
72  }
73 
74  protected function getGroupName() {
75  return 'wiki';
76  }
77 }
AllMessagesTablePager
Definition: AllMessagesTablePager.php:32
$request
error also a ContextSource you ll probably need to make sure the header is varied on $request
Definition: hooks.txt:2612
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:675
SpecialAllMessages\$table
AllMessagesTablePager $table
Definition: SpecialAllMessages.php:34
SpecialAllMessages\__construct
__construct()
Constructor.
Definition: SpecialAllMessages.php:39
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
SpecialPage\addHelpLink
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
Definition: SpecialPage.php:785
SpecialPage\getConfig
getConfig()
Shortcut to get main config object.
Definition: SpecialPage.php:714
table
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global then executing the whole list after the page is displayed We don t do anything smart like collating updates to the same table or such because the list is almost always going to have just one item on if so it s not worth the trouble Since there is a job queue in the jobs table
Definition: deferred.txt:11
wfGetLangObj
wfGetLangObj( $langcode=false)
Return a Language object from $langcode.
Definition: GlobalFunctions.php:1321
SpecialPage\setHeaders
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
Definition: SpecialPage.php:484
SpecialAllMessages
Definition: SpecialAllMessages.php:30
SpecialPage
Parent class for all special pages.
Definition: SpecialPage.php:36
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:665
SpecialAllMessages\execute
execute( $par)
Show the special page.
Definition: SpecialAllMessages.php:48
SpecialPage\outputHeader
outputHeader( $summaryMessageKey='')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Definition: SpecialPage.php:583
SpecialAllMessages\getGroupName
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Definition: SpecialAllMessages.php:74
$out
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that probably a stub it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
Definition: hooks.txt:783