Manual:Hooks/ParserFirstCallInit/pl
Appearance
ParserFirstCallInit | |
---|---|
Dostępne od wersji version 1.12.0 called when the parser initializes for the first time | |
Zdefiniuj funkcję: | public static function onParserFirstCallInit( Parser $parser ) { ... }
|
Dołącz hak: | W extension.json:
{
"Hooks": {
"ParserFirstCallInit": "MediaWiki\\Extension\\MyExtension\\Hooks::onParserFirstCallInit"
}
}
|
Called from: | Plik(i): parser/Parser.php Function(s): __construct |
Interface: | ParserFirstCallInitHook.php |
For more information about attaching hooks, see Podręcznik:Haki .
For examples of extensions using this hook, see Category:ParserFirstCallInit extensions/pl.
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)