Modèle:ExtensionHook

This page is a translated version of the page Template:ExtensionHook and the translation is 100% complete.
Documentation du modèle

Copier/coller le modèle

MyHook
Disponible depuis la version ???

Fonction à définir :
public static function onMyHook( $x, $y ) { ... }
Accroche correspondante :
$wgHooks['MyHook'][] = 'MyExtensionHooks::onMyHook';
Appelé de :Fichier(s) :

Pour plus d'information sur la manière d'attacher des accroches (hooks), voir Accroches .
Pour des exemples d'autres extensions qui utilisent cette accroche, voir Category:MyHook extensions/fr .

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

Notes d'utilisation

name
Nom de l'accoche. C'est habituellement le même nom que celui de la sous-page.
version
Version de MediaWiki pour laquelle cette accroche a été introduite pour la première fois.
rev
Révision SVN pour laquelle cette accroche a été introduite pour la première fois. Si ce paramètre est fourni, il pointera vers la page CodeReview concernée (par exemple r115794).
gerrit
Numéro de modification Gerrit pour lequel cette accroche a été introduite pour la première fois. Si ce paramètre est fourni, il doit pointer vers la page du groupe de modifications approprié de Gerrit (par exemple Gerrit modification 5)
removed
Si l'accroche a été supprimée, la version de MediaWiki dans laquelle la suppression a eu lieu.
deprecated
Si l'accroche est obsolète, (mais n'a pas été supprimée), la version de MediaWiki dans laquelle l'obsolescence a été déclarée.
summary
Une brève description de ce que fait l'accroche.
Une description plus détaillée est souhaitable, et doit être ajoutée au contenu de la page principale.
Si vous mettez à jour la description courte, pensez également à mettre à jour les deux tables de Accroches .
args
Les arguments, tels qu'ils sont utilisés au début de la fonction.
extension
Extension name where hook is called; for when the source is not in the MediaWiki core code repository.
source
Emplacement (nom de fichier) qui appelle cette accroche dans le code. D'autres emplacements peuvent être ajoutés via source2...source10.
sourcefunction
Nom de la fonction qui appelle cette accroche. On peut en ajouter une autre via sourcefunction2.
sourceclass
Nom de la classe qui appelle cette accroche.
newvarname
Utilisé par {{Removed }} ou {{Modèle:Deprecated }} lorsque removed ou deprecated est positionné.
newvarlink
Utilisé par {{Removed }} ou {{Modèle:Deprecated }} lorsque removed ou deprecated est positionné.
templatemode
Mettre nocats si vous ne voulez pas que la documentation de l'accroche apparaisse dans les catégories standard de MediaWiki.
Par défaut, l'utilisation de ce modèle place la documentation dans les catégories :
  • Accroches MediaWiki
  • Accroches ajoutées à MediaWiki...
Dans certains cas, il n'est pas souhaitable que la documentation de l'accroche soit automatiquement catégorisée. Des exemples seront inclus lors de la documentation d'une accroche, ou à la documentation du modèle lui-même.
nocatdesc
Si une accroche est complètement supprimée de la version de MediaWiki en positionnant yes, la description de la catégorie ne sera pas affichée.

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

Voir aussi