Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 33 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
RLRegisterModulesHandler | |
0.00% |
0 / 33 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
onResourceLoaderRegisterModules | |
0.00% |
0 / 33 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | namespace MediaWiki\CheckUser\HookHandler; |
4 | |
5 | use ExtensionRegistry; |
6 | use MediaWiki\ResourceLoader\Hook\ResourceLoaderRegisterModulesHook; |
7 | use MediaWiki\ResourceLoader\ResourceLoader; |
8 | |
9 | class RLRegisterModulesHandler implements ResourceLoaderRegisterModulesHook { |
10 | |
11 | /** |
12 | * @inheritDoc |
13 | */ |
14 | public function onResourceLoaderRegisterModules( ResourceLoader $resourceLoader ): void { |
15 | if ( ExtensionRegistry::getInstance()->isLoaded( 'GuidedTour' ) ) { |
16 | |
17 | $dir = dirname( __DIR__, 2 ) . '/modules/'; |
18 | |
19 | $modules = [ |
20 | 'ext.guidedTour.tour.checkuserinvestigateform' => [ |
21 | 'localBasePath' => $dir . 'ext.guidedTour.tour.checkuserinvestigateform', |
22 | 'remoteExtPath' => "CheckUser/modules", |
23 | 'scripts' => "checkuserinvestigateform.js", |
24 | 'dependencies' => 'ext.guidedTour', |
25 | 'messages' => [ |
26 | 'checkuser-investigate-tour-targets-title', |
27 | 'checkuser-investigate-tour-targets-desc' |
28 | ] |
29 | ], |
30 | 'ext.guidedTour.tour.checkuserinvestigate' => [ |
31 | 'localBasePath' => $dir . 'ext.guidedTour.tour.checkuserinvestigate', |
32 | 'remoteExtPath' => "CheckUser/module", |
33 | 'scripts' => 'checkuserinvestigate.js', |
34 | 'dependencies' => [ 'ext.guidedTour', 'ext.checkUser' ], |
35 | 'messages' => [ |
36 | 'checkuser-investigate-tour-useragents-title', |
37 | 'checkuser-investigate-tour-useragents-desc', |
38 | 'checkuser-investigate-tour-addusertargets-title', |
39 | 'checkuser-investigate-tour-addusertargets-desc', |
40 | 'checkuser-investigate-tour-filterip-title', |
41 | 'checkuser-investigate-tour-filterip-desc', |
42 | 'checkuser-investigate-tour-block-title', |
43 | 'checkuser-investigate-tour-block-desc', |
44 | 'checkuser-investigate-tour-copywikitext-title', |
45 | 'checkuser-investigate-tour-copywikitext-desc', |
46 | ], |
47 | ] |
48 | ]; |
49 | |
50 | $resourceLoader->register( $modules ); |
51 | } |
52 | } |
53 | |
54 | } |