Manual:Hooks/ParserFirstCallInit/pl

From Linux Web Expert

Revision as of 15:11, 2 February 2024 by imported>Chrumps (Created page with "== Zobacz też ==")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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:

Phabricator

  • phab:T299528 - Deprecate and remove ParserFirstCallInit hook (move hook/tag registration out of Parser constructor)

Zobacz też