MediaWiki REL1_41
MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\ResourceLoader\HookRunner.

Public Member Functions

 onResourceLoaderGetConfigVars (array &$vars, $skin, Config $config)
 Export static site-wide mw.config variables to JavaScript.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "ResourceLoaderGetConfigVars" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 14 of file ResourceLoaderGetConfigVarsHook.php.

Member Function Documentation

◆ onResourceLoaderGetConfigVars()

MediaWiki\ResourceLoader\Hook\ResourceLoaderGetConfigVarsHook::onResourceLoaderGetConfigVars ( array & $vars,
$skin,
Config $config )

Export static site-wide mw.config variables to JavaScript.

Variables that depend on the current page or request state must be added through MediaWiki\Hook\MakeGlobalVariablesScriptHook instead. The skin name is made available to send skin-specific config only when needed.

This hook is called from ResourceLoaderStartUpModule.

Since
1.35
Parameters
array&$vars[ variable name => value ]
string$skin
Config$configsince 1.34
Returns
void This hook must not abort, it must return no value

Implemented in MediaWiki\ResourceLoader\HookRunner.


The documentation for this interface was generated from the following file: