38 private $languageFactory;
41 private $languageNameUtils;
44 private $loadBalancer;
47 private $localisationCache;
61 parent::__construct(
'Allmessages' );
62 $this->languageFactory = $languageFactory;
63 $this->languageNameUtils = $languageNameUtils;
64 $this->localisationCache = $localisationCache;
65 $this->loadBalancer = $loadBalancer;
76 if ( !$this->
getConfig()->
get( MainConfigNames::UseDatabaseMessages ) ) {
77 $out->addWikiMsg(
'allmessages-not-supported-database' );
82 $out->addModuleStyles(
'mediawiki.special' );
90 $opts->add(
'prefix',
'' );
91 $opts->add(
'filter',
'all' );
92 $opts->add(
'lang', $contLangCode );
93 $opts->add(
'limit', 50 );
95 $opts->fetchValuesFromRequest( $this->
getRequest() );
96 $opts->validateIntBounds(
'limit', 0, 5000 );
101 $this->languageFactory,
102 $this->languageNameUtils,
105 $this->localisationCache,
113 'label-message' =>
'allmessages-prefix',
119 'label-message' =>
'allmessages-filter',
120 'options-messages' => [
121 'allmessages-filter-unmodified' =>
'unmodified',
122 'allmessages-filter-all' =>
'all',
123 'allmessages-filter-modified' =>
'modified',
130 'type' =>
'language',
132 'label-message' =>
'allmessages-language',
133 'default' => $opts->getValue(
'lang' ),
137 'type' =>
'limitselect',
139 'label-message' =>
'table_pager_limit_label',
141 $lang->formatNum( 20 ) => 20,
142 $lang->formatNum( 50 ) => 50,
143 $lang->formatNum( 100 ) => 100,
144 $lang->formatNum( 250 ) => 250,
145 $lang->formatNum( 500 ) => 500,
146 $lang->formatNum( 5000 ) => 5000,
148 'default' => $opts->getValue(
'limit' ),
152 $htmlForm = HTMLForm::factory(
'ooui', $formDescriptor, $this->
getContext() );
155 ->setIntro( $this->
msg(
'allmessagestext' ) )
156 ->setWrapperLegendMsg(
'allmessages' )
157 ->setSubmitTextMsg(
'allmessages-filter-submit' )
159 ->displayForm(
false );
161 $out->addParserOutputContent( $pager->getFullOutput() );
Caching for the contents of localisation files.
A class containing constants representing the names of configuration variables.
__construct(LanguageFactory $languageFactory, LanguageNameUtils $languageNameUtils, LocalisationCache $localisationCache, ILoadBalancer $loadBalancer)
getGroupName()
Under which header this special page is listed in Special:SpecialPages See messages 'specialpages-gro...
Parent class for all special pages.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getOutput()
Get the OutputPage being used for this instance.
getContext()
Gets the context this SpecialPage is executed in.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getConfig()
Shortcut to get main config object.
getRequest()
Get the WebRequest being used for this instance.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.
getContentLanguage()
Shortcut to get content language.
if(!isset( $args[0])) $lang