MediaWiki fundraising/REL1_35
HookRunner.php
Go to the documentation of this file.
1<?php
2
4
7
12class HookRunner implements
18{
20 private $container;
21
23 $this->container = $container;
24 }
25
26 public function onResourceLoaderForeignApiModules( &$dependencies, $context ) : void {
27 $this->container->run(
28 'ResourceLoaderForeignApiModules',
29 [ &$dependencies, $context ],
30 [ 'abortable' => false ]
31 );
32 }
33
34 public function onResourceLoaderRegisterModules( ResourceLoader $rl ) : void {
35 $this->container->run(
36 'ResourceLoaderRegisterModules',
37 [ $rl ],
38 [ 'abortable' => false ]
39 );
40 }
41
42 public function onResourceLoaderSiteModulePages( $skin, array &$pages ) : void {
43 $this->container->run(
44 'ResourceLoaderSiteModulePages',
45 [ $skin, &$pages ],
46 [ 'abortable' => false ]
47 );
48 }
49
50 public function onResourceLoaderSiteStylesModulePages( $skin, array &$pages ) : void {
51 $this->container->run(
52 'ResourceLoaderSiteStylesModulePages',
53 [ $skin, &$pages ],
54 [ 'abortable' => false ]
55 );
56 }
57
58 public function onResourceLoaderTestModules( array &$testModules, ResourceLoader $rl ) : void {
59 $this->container->run(
60 'ResourceLoaderTestModules',
61 [ &$testModules, $rl ],
62 [ 'abortable' => false ]
63 );
64 }
65}
onResourceLoaderForeignApiModules(&$dependencies, $context)
Add dependencies to the mediawiki.ForeignApi module when you wish to override its behavior.
onResourceLoaderTestModules(array &$testModules, ResourceLoader $rl)
Use this hook to register ResourceLoader modules that are only available when $wgEnableJavaScriptTest...
onResourceLoaderSiteModulePages( $skin, array &$pages)
Change which wiki pages comprise the site module in given skin.
onResourceLoaderRegisterModules(ResourceLoader $rl)
This hook is called right before modules information is required, such as when responding to a resour...
__construct(HookContainer $container)
onResourceLoaderSiteStylesModulePages( $skin, array &$pages)
Change which wiki pages comprise the site.styles module in given skin.
ResourceLoader is a loading system for JavaScript and CSS resources.