Movatterモバイル変換


[0]ホーム

URL:


Jump to content
MediaWiki
Search

Manual:Hooks/ParserTestGlobals

From mediawiki.org
<Manual:Hooks
ParserTestGlobals
Available fromversion 1.20.0
Allows to define globals for parser tests.
Define function:
publicstaticfunctiononParserTestGlobals(array&$globals){...}
Attach hook:Inextension.json:
{"Hooks":{"ParserTestGlobals":"MediaWiki\\Extension\\MyExtension\\Hooks::onParserTestGlobals"}}
Called from:File(s):../tests/parser/ParserTestRunner.php
Interface:ParserTestGlobalsHook.php

For more information about attaching hooks, seeManual:Hooks.
For examples of extensions using this hook, seeCategory:ParserTestGlobals extensions.


Details

[edit]
  • &$globals: Array with all the globals which should be set for parser tests. The arrays keys serve as the globals names, its values are the globals values.
Retrieved from "https://www.mediawiki.org/w/index.php?title=Manual:Hooks/ParserTestGlobals&oldid=3295641"
Categories:

[8]ページ先頭

©2009-2025 Movatter.jp