62 parent::__construct(
'Allmessages' );
63 $this->languageFactory = $languageFactory;
64 $this->languageNameUtils = $languageNameUtils;
65 $this->localisationCache = $localisationCache;
66 $this->dbProvider = $dbProvider;
78 $out->addWikiMsg(
'allmessages-not-supported-database' );
83 $out->addModuleStyles(
'mediawiki.special' );
91 $opts->add(
'prefix',
'' );
92 $opts->add(
'filter',
'all' );
93 $opts->add(
'lang', $contLangCode );
94 $opts->add(
'limit', 50 );
96 $opts->fetchValuesFromRequest( $this->
getRequest() );
97 $opts->validateIntBounds(
'limit', 0, 5000 );
99 if ( !$this->languageNameUtils->isKnownLanguageTag( $opts->getValue(
'lang' ) ) ) {
103 $this->
msg(
'allmessages-unknown-language' )
104 ->plaintextParams( $opts->getValue(
'lang' ) )
108 $opts->setValue(
'lang', $contLangCode );
114 $this->languageFactory,
117 $this->localisationCache,
125 'label-message' =>
'allmessages-prefix',
131 'label-message' =>
'allmessages-filter',
132 'options-messages' => [
133 'allmessages-filter-unmodified' =>
'unmodified',
134 'allmessages-filter-all' =>
'all',
135 'allmessages-filter-modified' =>
'modified',
142 'type' =>
'language',
144 'label-message' =>
'allmessages-language',
145 'default' => $opts->getValue(
'lang' ),
149 'type' =>
'limitselect',
151 'label-message' =>
'table_pager_limit_label',
153 $lang->formatNum( 20 ) => 20,
154 $lang->formatNum( 50 ) => 50,
155 $lang->formatNum( 100 ) => 100,
156 $lang->formatNum( 250 ) => 250,
157 $lang->formatNum( 500 ) => 500,
158 $lang->formatNum( 5000 ) => 5000,
160 'default' => $opts->getValue(
'limit' ),
164 $htmlForm = HTMLForm::factory(
'ooui', $formDescriptor, $this->
getContext() );
167 ->setPreHtml( $this->
msg(
'allmessagestext' )->parse() )
168 ->setWrapperLegendMsg(
'allmessages' )
169 ->setSubmitTextMsg(
'allmessages-filter-submit' )
171 ->displayForm(
false );
173 $out->addParserOutputContent( $pager->getFullOutput() );
184class_alias( SpecialAllMessages::class,
'SpecialAllMessages' );
Caching for the contents of localisation files.
A class containing constants representing the names of configuration variables.
const UseDatabaseMessages
Name constant for the UseDatabaseMessages setting, for use with Config::get()
Parent class for all special pages.
setHeaders()
Sets headers - this should be called from the execute() method of all derived classes!
getConfig()
Shortcut to get main config object.
getContext()
Gets the context this SpecialPage is executed in.
getRequest()
Get the WebRequest being used for this instance.
msg( $key,... $params)
Wrapper around wfMessage that sets the current context.
getOutput()
Get the OutputPage being used for this instance.
getContentLanguage()
Shortcut to get content language.
getLanguage()
Shortcut to get user's language.
addHelpLink( $to, $overrideBaseUrl=false)
Adds help link with an icon via page indicators.