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
|
|
|
|
2020-03-16 23:31:05 +00:00
|
|
|
use ResourceLoaderContext;
|
|
|
|
|
|
2020-03-03 22:50:34 +00:00
|
|
|
/**
|
|
|
|
|
* @stable for implementation
|
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,
|
|
|
|
|
* and they may only vary by what's in the ResourceLoaderContext.
|
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
|
2020-03-16 23:31:05 +00:00
|
|
|
* @param ResourceLoaderContext $context
|
2020-04-20 06:03:16 +00:00
|
|
|
* @param string[] &$magicWords Associative array mapping all-caps magic word to a string value
|
2020-03-03 22:50:34 +00:00
|
|
|
* @return bool|void True or no return value to continue or false to abort
|
|
|
|
|
*/
|
2020-04-21 18:08:02 +00:00
|
|
|
public function onResourceLoaderJqueryMsgModuleMagicWords(
|
|
|
|
|
ResourceLoaderContext $context,
|
|
|
|
|
array &$magicWords
|
2020-03-03 22:50:34 +00:00
|
|
|
);
|
|
|
|
|
}
|