| 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 |
|
| 14 |
private $mathConfig; |
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
public function __construct( |
| 20 |
MathConfig $mathConfig |
| 21 |
) { |
| 22 |
$this->mathConfig = $mathConfig; |
| 23 |
} |
| 24 |
|
| 25 |
|
| 26 |
public function onResourceLoaderGetConfigVars( array &$vars, $skin, Config $config ): void { |
| 27 |
$vars['wgMathEntitySelectorUrl'] = $this->mathConfig->getMathEntitySelectorUrl(); |
| 28 |
} |
| 29 |
} |