Manual:Hooks/ParserFirstCallInit/ja

From Linux Web Expert

The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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>Manual:フック </tvar>.</translate>
<translate> For examples of extensions using this hook, see <tvar name=cat>Category:ParserFirstCallInit extensions/ja</tvar>.</translate>

詳細

  • Parser $parser: パーサのオブジェクトを初期化

このフックの正しい使い方例は以下を参照してください:

Phabricator

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

関連項目