Template:ExtensionHook

From mediawiki.org
This page is a translated version of the page Template:ExtensionHook and the translation is 97% complete.
テンプレートの解説

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

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

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

フックの設定についての詳細情報は Manual:フック を参照してください。
このフックを使用する他の拡張機能の例は、Category:MyHook extensions/ja を参照してください。

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

使用法の注記

name
フックの名前。 これは通常、下位ページと同じ名前です。
version
このフックが最初に導入された MediaWiki バージョン。
rev
このフックが最初に導入された SVN リビジョン。 このパラメーターが指定されている場合、適切な CodeReview ページ (例: r115794) にリンクされます。
gerrit
このフックが最初に導入された Gerrit change 番号。 このパラメーターを指定すると、適切な Gerrit 変更セット ページにリンクされます (例: Gerrit 変更 5)
removed
フックが除去された場合は、それが除去された際の MediaWiki のバージョン。
deprecated
フックが廃止予定になった (ただし除去はされていない) 場合、廃止予定になった際の MediaWiki バージョン。
summary
フックの使用目的の短い説明。
より詳細な説明が望ましいため、メイン ページの本文に追加する必要があります。
短い説明を更新する場合は、Manual:フック の 2 つの表も更新してください。
args
関数の上部で使用される引数。
extension
Extension name where hook is called; for when the source is not in the MediaWiki core code repository.
source
コード内でこのフックを呼び出す場所 (ファイル名)。さらに場所を source2...source10 で追加できます。
sourcefunction
このフックを呼び出す関数の名前。sourcefunction2 でもう 1 つ追加できます。
sourceclass
このフックを呼び出すクラスの名前。
newvarname
removed または deprecated が設定されている場合、{{Removed }} または {{Deprecated }} によって使用されます。
newvarlink
removed または deprecated が設定されている場合、{{Removed }} または {{Deprecated }} によって使用されます。
templatemode
フックの説明文書を標準の MediaWiki カテゴリに表示しない場合は、nocats に設定します。
既定では、このテンプレートを使用すると、説明文書ページがカテゴリに追加されます:
  • MediaWiki フック
  • MediaWiki に追加されたフック...
フックの説明文書を自動的にカテゴリ化 (カテゴリに追加) することが望ましくない場合があります。 その例には、拡張機能のフックを文書化する場合、テンプレート自体を文書化する場合が含まれます。
nocatdesc
If a hook is removed completely from MediaWiki version by setting yes, it will not show up the category description.

Template data

A card which describes the information of a hook registered by an extension.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Template modetemplatemode

no description

Stringoptional
Namename

The name of the hook. This is usually the same name as the sub-page.

Stringrequired
SVN revision introducedrev

SVN revision in which this hook was first introduced. If this parameter is given, it will link to the appropriate CodeReview page.

Stringoptional
Gerrit changeset introducedgerrit

Gerrit change number in which this hook was first introduced. If this parameter is given, it will link to the appropriate Gerrit changeset page.

Numbersuggested
Version introducedversion

The version of MediaWiki this hook was first introduced in.

Stringsuggested
Version deprecateddeprecated

If the hook has been deprecated, the version of MediaWiki that it was deprecated in.

Stringoptional
Gerrit ID of deprecationgerritdeprecated

no description

Numberoptional
Version removedremoved

If the hook has been removed, the version of MediaWiki that it was removed in.

Stringoptional
Gerrit ID of removalgerritremoved

no description

Numberoptional
Replacement namenewvarname

If the hook is either deprecated or removed, name the feature that replaces this hook, if there is any replacement.

Stringoptional
Replacement linknewvarlink

If the hook is either deprecated or removed, link to the feature that replaces this hook, if there is any replacement.

Page nameoptional
Summarysummary

A short description of the hook's purpose. More detailed descriptions are desirable, and should be added to the main page content.

Stringsuggested
Argumentsargs

The arguments that are defined by the hook signature.

Stringrequired
Extension nameextension

Extension name where the hook is called; for when the source is not in the MediaWiki core code repository.

Page namerequired
Source 1source

Location (file name) which calls this hook in the code.

Stringsuggested
Source 2source2

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 3source3

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 4source4

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 5source5

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 6source6

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 7source7

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 8source8

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 9source9

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source 10source10

Location (file name) which calls this hook in the code, if another source exists

Stringoptional
Source classsourceclass

The fully qualified class name (FQCN) which calls this hook.

Stringsuggested
Source functionsourcefunction

Name of the function which calls this hook

Stringsuggested
Source function 2sourcefunction2

Name of the function which calls this hook, if another functions call this hook

Stringoptional
No category descriptionnocatdesc

Allows to hide the category hook description if the hook was removed completely from MediaWiki version.

Stringoptional

関連項目