Manual:Hooks/ParserFirstCallInit/pl
From Linux Web Expert
ParserFirstCallInit | |
---|---|
<translate> Available from <tvar name=1><translate> version <tvar </tvar></translate> called when the parser initializes for the first time | |
<translate> Define function:</translate> | public static function onParserFirstCallInit( Parser $parser ) { ... }
|
<translate> Attach hook:</translate> | <translate> In <tvar name=1>extension.json</tvar>:</translate>
{
"Hooks": {
"ParserFirstCallInit": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserFirstCallInit"
}
}
|
<translate> Called from:</translate> | <translate> File(s):</translate> parser/Parser.php <translate> Function(s):</translate> __construct |
<translate> Interface:</translate> | ParserFirstCallInitHook.php |
<translate> For more information about attaching hooks, see <tvar name=1>Podręcznik:Haki </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserFirstCallInit extensions/pl</tvar>.</translate>
Szczegóły
- Parser $parser: Parser object being initialized
Przykłady
For examples on how this hook should be used, please see:
- Podręcznik:Funkcje parsera - using curly braces such as {{#expr: ... }}
- Manual:Tag extensions - using XML-type tags such as
<ref>...</ref>
Phabricator
- phab:T299528 - Deprecate and remove ParserFirstCallInit hook (move hook/tag registration out of Parser constructor)