Manual:Hooks/ParserGetVariableValueVarCache

From Linux Web Expert

ParserGetVariableValueVarCache
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate>
<translate> Removed in <tvar name=1><translate> version <tvar (Gerrit change 822667)</tvar></translate>
use this to change the value of the variable cache or return false to not use it
<translate> Define function:</translate>
public static function onParserGetVariableValueVarCache( Parser $parser, array $varCache ) { ... }
<translate> Attach hook:</translate> <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
	"Hooks": {
		"ParserGetVariableValueVarCache": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserGetVariableValueVarCache"
	}
}
<translate> Called from:</translate> <translate> File(s):</translate> parser/Parser.php
<translate> Interface:</translate> ParserGetVariableValueVarCacheHook.php

<translate> For more information about attaching hooks, see <tvar name=1>Manual:Hooks </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserGetVariableValueVarCache extensions</tvar>.</translate>


Details

  • $parser: Parser object
  • $varCache: variable cache (array)