MediaWiki REL1_30
ResourceLoaderSpecialCharacterDataModule.php
Go to the documentation of this file.
1<?php
29 private $path = "resources/src/mediawiki.language/specialcharacters.json";
30 protected $targets = [ 'desktop', 'mobile' ];
31
37 protected function getData() {
38 global $IP;
39 return json_decode( file_get_contents( "$IP/{$this->path}" ) );
40 }
41
47 return Xml::encodeJsCall(
48 'mw.language.setSpecialCharacters',
49 [
50 $this->getData()
51 ],
53 );
54 }
55
59 public function enableModuleContentVersion() {
60 return true;
61 }
62
68 return [ 'mediawiki.language' ];
69 }
70
74 public function getMessages() {
75 return [
76 'special-characters-group-latin',
77 'special-characters-group-latinextended',
78 'special-characters-group-ipa',
79 'special-characters-group-symbols',
80 'special-characters-group-greek',
81 'special-characters-group-greekextended',
82 'special-characters-group-cyrillic',
83 'special-characters-group-arabic',
84 'special-characters-group-arabicextended',
85 'special-characters-group-persian',
86 'special-characters-group-hebrew',
87 'special-characters-group-bangla',
88 'special-characters-group-tamil',
89 'special-characters-group-telugu',
90 'special-characters-group-sinhala',
91 'special-characters-group-devanagari',
92 'special-characters-group-gujarati',
93 'special-characters-group-thai',
94 'special-characters-group-lao',
95 'special-characters-group-khmer',
96 'special-characters-group-canadianaboriginal',
97 'special-characters-title-endash',
98 'special-characters-title-emdash',
99 'special-characters-title-minus'
100 ];
101 }
102}
Object passed around to modules which contains information about the state of a specific loader reque...
Abstraction for ResourceLoader modules, with name registration and maxage functionality.
ResourceLoader module for populating special characters data for some editing extensions to use.
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:2780
$IP
Definition update.php:3