MediaWiki  1.28.0
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  $this->langcode = $this->table->lang->getCode();
71 
72  $out->addHTML( $this->table->buildForm() );
73  $out->addParserOutputContent( $this->table->getFullOutput() );
74  }
75 
76  protected function getGroupName() {
77  return 'wiki';
78  }
79 }
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:802
execute($par)
Show the special page.
getOutput()
Get the OutputPage being used for this instance.
addHelpLink($to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
outputHeader($summaryMessageKey= '')
Outputs a summary message on top of special pages Per default the message key is the canonical name o...
Parent class for all special pages.
Definition: SpecialPage.php:36
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes! ...
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
error also a ContextSource you ll probably need to make sure the header is varied on $request
Definition: hooks.txt:2573
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
getConfig()
Shortcut to get main config object.
__construct()
Constructor.
getRequest()
Get the WebRequest being used for this instance.
AllMessagesTablePager $table
wfGetLangObj($langcode=false)
Return a Language object from $langcode.
Use TablePager for prettified output.