Register EventLogging schema in extension.json

Change-Id: I4079f13a6708ad4376b7686c3926cd59ff90aaa7
This commit is contained in:
Kunal Mehta 2018-06-11 18:30:22 -07:00
parent d76a4fde65
commit 0837f19dcd
2 changed files with 3 additions and 23 deletions

View file

@ -36,9 +36,6 @@
"BeforePageDisplay": [
"RelatedArticles\\Hooks::onBeforePageDisplay"
],
"EventLoggingRegisterSchemas": [
"RelatedArticles\\Hooks::onEventLoggingRegisterSchemas"
],
"ResourceLoaderGetConfigVars": [
"RelatedArticles\\Hooks::onResourceLoaderGetConfigVars"
],
@ -155,6 +152,9 @@
]
}
},
"EventLoggingSchemas": {
"RelatedArticles": 16352530
},
"config": {
"@RelatedArticlesCardLimit": "Maximum number of articles that should be shown in RelatedArticles widget. This limit is derived from limits in TextExtracts and PageImages extensions. Number should be between 1 and 20.",
"RelatedArticlesCardLimit": 3,

View file

@ -123,26 +123,6 @@ class Hooks {
return true;
}
/**
* EventLoggingRegisterSchemas hook handler.
*
* Registers our EventLogging schemas so that they can be converted to
* ResourceLoaderSchemaModules by the EventLogging extension.
*
* If the module has already been registered in
* onResourceLoaderRegisterModules, then it is overwritten.
*
* @param array &$schemas The schemas currently registered with the EventLogging
* extension
* @return bool Always true
*/
public static function onEventLoggingRegisterSchemas( &$schemas ) {
// @see https://meta.wikimedia.org/wiki/Schema:RelatedArticles
$schemas['RelatedArticles'] = 16352530;
return true;
}
/**
* ResourceLoaderGetConfigVars hook handler for setting a config variable
* @see https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderGetConfigVars