Template:ExtensionHook

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Template:ExtensionHook and the translation is 49% complete.

Other languages:
English • ‎dansk • ‎polski • ‎中文 • ‎日本語
解説のアイコン テンプレートの解説

コピー&ペースト用テンプレート

MyHook
バージョン ??? から利用可能

関数の定義:
public static function onMyHook( $x, $y ) { ... }
フックのアタッチ:
$wgHooks['MyHook'][] = 'MyExtensionHooks::onMyHook';
呼び出し元:ファイル:

For more information about attaching hooks, see Manual:Hooks.
For examples of other extensions using this hook, see Category:MyHook extensions/ja.

{{ExtensionHook
|name = MyHook
|version =
|gerrit =
|removed =
|summary =
|args = $x, $y
|source =
|sourcefunction =
|sourceclass =
|newvarname =
|newvarlink =
}}

使用法の注記

name
フックの名前。 This is usually the same name as the sub-page.
version
このフックが最初に導入された MediaWiki バージョン。
rev
このフックが最初に導入された SVN リビジョン。 If this parameter is given, it'll link to the appropriate CodeReview page (e.g. Special:Code/MediaWiki/1).
gerrit
このフックが最初に導入された Gerrit change 番号。 If this parameter is given, it'll link to the appropriate Gerrit changeset page (e.g. Gerrit change 1)
removed
If the hook has been removed, the version of MediaWiki that it was removed in.
deprecated
If the hook has been deprecated (but not removed), the version of MediaWiki that it was deprecated in.
summary
フックの使用目的の短い説明。
More detailed descriptions are desirable, and should be added to the main page content.
If you update the short description, please also update the two tables on Manual:フック .
args
The arguments, as used at the top of the function.
source
Location (file name) which calls this hook in the code. Further locations can be added via source2...source10.
sourcefunction
Name of the function which calls this hook. Another can be added via sourcefunction.
sourceclass
Name of the class which calls this hook.
templatemode
Set to nocats if hook documentation should not appear in standard MediaWiki Categories.
By default, using this template places the documentation page into categories:
  • MediaWiki フック
  • MediaWiki に追加されたフック...
There are times when it is undesirable to automatically categorize the hook documentation. Examples would include when documenting a hook in an extension, or when documenting the template itself.