Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| ResourceLoaderConfigHandler | |
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| __construct | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| onResourceLoaderGetConfigVars | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Extension\Math\HookHandlers; |
| 4 | |
| 5 | use MediaWiki\Config\Config; |
| 6 | use MediaWiki\Extension\Math\MathConfig; |
| 7 | use MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook; |
| 8 | |
| 9 | class ResourceLoaderConfigHandler implements |
| 10 | ResourceLoaderGetConfigVarsHook |
| 11 | { |
| 12 | |
| 13 | /** @var MathConfig */ |
| 14 | private $mathConfig; |
| 15 | |
| 16 | /** |
| 17 | * @param MathConfig $mathConfig |
| 18 | */ |
| 19 | public function __construct( |
| 20 | MathConfig $mathConfig |
| 21 | ) { |
| 22 | $this->mathConfig = $mathConfig; |
| 23 | } |
| 24 | |
| 25 | /** @inheritDoc */ |
| 26 | public function onResourceLoaderGetConfigVars( array &$vars, $skin, Config $config ): void { |
| 27 | $vars['wgMathEntitySelectorUrl'] = $this->mathConfig->getMathEntitySelectorUrl(); |
| 28 | } |
| 29 | } |