MediaWiki REL1_32
ResourceLoaderLanguageNamesModule.php
Go to the documentation of this file.
1<?php
32
33 protected $targets = [ 'desktop', 'mobile' ];
34
39 protected function getData( ResourceLoaderContext $context ) {
40 return Language::fetchLanguageNames(
41 $context->getLanguage(),
42 'all'
43 );
44 }
45
51 return Xml::encodeJsCall(
52 'mw.language.setData',
53 [
54 $context->getLanguage(),
55 'languageNames',
56 $this->getData( $context )
57 ],
59 );
60 }
61
67 return [ 'mediawiki.language' ];
68 }
69
73 public function enableModuleContentVersion() {
74 return true;
75 }
76
77}
Object passed around to modules which contains information about the state of a specific loader reque...
ResourceLoader module based on local JavaScript/CSS files.
ResourceLoader module for populating language specific data.
getDependencies(ResourceLoaderContext $context=null)
static inDebugMode()
Determine whether debug mode was requested Order of priority is 1) request param, 2) cookie,...
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 and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2885