Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 13 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 1 |
CitoidDataModule | |
0.00% |
0 / 13 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 1 |
getScript | |
0.00% |
0 / 8 |
|
0.00% |
0 / 1 |
2 | |||
getDependencies | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
2 | |||
enableModuleContentVersion | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 |
1 | <?php |
2 | /** |
3 | * Resource loader module providing extra data from the server to Citoid. |
4 | * |
5 | * Temporary hack for T93800 |
6 | * |
7 | * @file |
8 | * @ingroup Extensions |
9 | * @copyright 2011-2015 Citoid Team and others; see AUTHORS.txt |
10 | * @license MIT |
11 | */ |
12 | |
13 | namespace MediaWiki\Extension\Citoid; |
14 | |
15 | use MediaWiki\ResourceLoader as RL; |
16 | |
17 | class CitoidDataModule extends RL\Module { |
18 | |
19 | /** |
20 | * @param RL\Context $context |
21 | * @return string |
22 | */ |
23 | public function getScript( RL\Context $context ) { |
24 | return 've.init.platform.addMessages(' . $context->encodeJson( |
25 | [ |
26 | 'citoid-template-type-map.json' => |
27 | $context->msg( 'citoid-template-type-map.json' ) |
28 | ->inContentLanguage() |
29 | ->plain(), |
30 | ] |
31 | ) . ');'; |
32 | } |
33 | |
34 | /** |
35 | * @param RL\Context|null $context |
36 | * @return string[] |
37 | */ |
38 | public function getDependencies( RL\Context $context = null ) { |
39 | return [ |
40 | 'ext.visualEditor.base', |
41 | 'ext.visualEditor.mediawiki', |
42 | ]; |
43 | } |
44 | |
45 | /** |
46 | * @return bool |
47 | */ |
48 | public function enableModuleContentVersion() { |
49 | return true; |
50 | } |
51 | } |