3 namespace MediaWiki\Hook
;
6 * This is a hook handler interface, see docs/Hooks.md.
7 * Use the hook name "ParserFetchTemplateData" to register handlers
8 * implementing this interface.
13 interface ParserFetchTemplateDataHook
{
15 * This hook allows Parsoid to fetch additional serialization information
16 * about a Template, including the type of its arguments, whether they
17 * should be serialized as inline or block style wikitext, etc.
18 * See [[Extension:TemplateData]] for more information.
20 * @param string[] $titles An array of template names
21 * @param array<string,object> &$tplData The hook will create an
22 * associative array, mapping each given
23 * template name to an object representing the TemplateData for that
24 * template, or special objects if the title doesn't exist, is missing
25 * TemplateData, or has malformed TemplateData.
26 * @return bool Typically returns true, to allow all registered hooks a
27 * chance to fill in template data.
29 * @unstable temporary hook; will be cleaned up before it is made stable
32 public function onParserFetchTemplateData(