MediaWiki  1.30.0
SpecialAllMessages.php
Go to the documentation of this file.
1 <?php
34  protected $table;
35 
36  public function __construct() {
37  parent::__construct( 'Allmessages' );
38  }
39 
45  public function execute( $par ) {
46  $request = $this->getRequest();
47  $out = $this->getOutput();
48 
49  $this->setHeaders();
50 
51  if ( !$this->getConfig()->get( 'UseDatabaseMessages' ) ) {
52  $out->addWikiMsg( 'allmessagesnotsupportedDB' );
53 
54  return;
55  }
56 
57  $this->outputHeader( 'allmessagestext' );
58  $out->addModuleStyles( 'mediawiki.special' );
59  $this->addHelpLink( 'Help:System message' );
60 
61  $this->table = new AllMessagesTablePager(
62  $this,
63  [],
64  wfGetLangObj( $request->getVal( 'lang', $par ) )
65  );
66 
67  $out->addHTML( $this->table->buildForm() );
68  $out->addParserOutputContent( $this->table->getFullOutput() );
69  }
70 
71  protected function getGroupName() {
72  return 'wiki';
73  }
74 }
AllMessagesTablePager
Definition: AllMessagesTablePager.php:32
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()
Definition: SpecialAllMessages.php:36
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:1368
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
$request
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request
Definition: hooks.txt:2581
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:45
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:71
$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:781