2020-03-03 22:50:34 +00:00
|
|
|
<?php
|
|
|
|
|
|
2020-04-21 18:08:02 +00:00
|
|
|
namespace MediaWiki\ResourceLoader\Hook;
|
2020-03-03 22:50:34 +00:00
|
|
|
|
2022-05-06 09:09:56 +00:00
|
|
|
use MediaWiki\ResourceLoader\Context;
|
2020-03-16 23:31:05 +00:00
|
|
|
|
2020-03-03 22:50:34 +00:00
|
|
|
/**
|
2020-09-26 13:18:43 +00:00
|
|
|
* This is a hook handler interface, see docs/Hooks.md.
|
|
|
|
|
* Use the hook name "ResourceLoaderJqueryMsgModuleMagicWords" to register handlers implementing this interface.
|
|
|
|
|
*
|
2020-07-13 09:05:49 +00:00
|
|
|
* @stable to implement
|
2020-04-21 18:08:02 +00:00
|
|
|
* @ingroup ResourceLoaderHooks
|
2020-03-03 22:50:34 +00:00
|
|
|
*/
|
|
|
|
|
interface ResourceLoaderJqueryMsgModuleMagicWordsHook {
|
|
|
|
|
/**
|
2020-04-21 18:08:02 +00:00
|
|
|
* Add magic words to the `mediawiki.jqueryMsg` module. The values should be a string,
|
2022-05-06 09:09:56 +00:00
|
|
|
* and they may only vary by what's in the Context.
|
2020-03-03 22:50:34 +00:00
|
|
|
*
|
2020-04-21 18:08:02 +00:00
|
|
|
* This hook is called from ResourceLoaderJqueryMsgModule.
|
2020-03-03 22:50:34 +00:00
|
|
|
*
|
2020-04-21 18:08:02 +00:00
|
|
|
* @since 1.35
|
2022-05-06 09:09:56 +00:00
|
|
|
* @param Context $context
|
2020-04-20 06:03:16 +00:00
|
|
|
* @param string[] &$magicWords Associative array mapping all-caps magic word to a string value
|
2020-06-30 21:18:44 +00:00
|
|
|
* @return void This hook must not abort, it must return no value
|
2020-03-03 22:50:34 +00:00
|
|
|
*/
|
2020-04-21 18:08:02 +00:00
|
|
|
public function onResourceLoaderJqueryMsgModuleMagicWords(
|
2022-05-06 09:09:56 +00:00
|
|
|
Context $context,
|
2020-04-21 18:08:02 +00:00
|
|
|
array &$magicWords
|
2021-07-22 03:11:47 +00:00
|
|
|
): void;
|
2020-03-03 22:50:34 +00:00
|
|
|
}
|