Template:ExtensionHook

From mediawiki.org
This page is a translated version of the page Template:ExtensionHook and the translation is 100% complete.
Template documentation

Zkopírování šablony a její vložení

MyHook
Dostupné od verze ???

Definice funkce:
public static function onMyHook( $x, $y ) { ... }
Registrace háčku:
$wgHooks['MyHook'][] = 'MyExtensionHooks::onMyHook';
Volá se z:Soubor/y:

Další informace o háčcích najdete na stránce Příručka:Háčky .
Chcete-li vědět, jaká rozšíření tento háček používají, podívejte se na stránku Category:MyHook extensions/cs.

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

Poznámky k použití

name
Název háčku. Obvykle se jedná o stejný název jako podstránky.
version
Verze MediaWiki, ve které byl tento háček poprvé představen.
rev
Revize SVN, ve které byl tento háček poprvé představen. Pokud je tento parametr uveden, bude odkazovat na příslušnou stránku CodeReview (např. r115794).
gerrit
Gerrit číslo změny, ve kterém byl tento háček poprvé představen. Pokud je tento parametr zadán, bude odkazovat na příslušnou stránku Gerrit changeset (např. Gerrit change 5)
removed
Pokud byl háček odstraněn, verze MediaWiki, ve které byl odstraněn.
deprecated
Pokud byl háček zastaralý (ale nebyl odstraněn), verze MediaWiki, ve které byl zastaralý.
summary
Krátký popis účelu háčku.
Podrobnější popisy jsou žádoucí a měly by být přidány k obsahu hlavní stránky.
Pokud aktualizujete krátký popis, aktualizujte také dvě tabulky na Příručka:Háčky .
args
Argumenty používané v horní části funkce.
extension
Extension name where hook is called; for when the source is not in the MediaWiki core code repository.
source
Umístění (název souboru), které volá tento háček v kódu. Další místa lze přidat prostřednictvím source2...source10.
sourcefunction
Název funkce, která volá tento háček. Další lze přidat prostřednictvím sourcefunction2.
sourceclass
Název třídy, která volá tento háček.
newvarname
Použito {{Removed}} nebo {{Deprecated}}, když je nastaveno removed nebo deprecated.
newvarlink
Použito {{Removed}} nebo {{Deprecated}}, když je nastaveno removed nebo deprecated.
templatemode
Nastavte na nocats, pokud by se dokumentace háčku neměla objevit ve standardních kategoriích MediaWiki.
Při použití této šablony standardně umístíte stránku dokumentace do kategorií:
  • Háčky MediaWiki
  • Háčky přidané do MediaWiki...
Jsou chvíle, kdy je nežádoucí automaticky kategorizovat dokumentaci háčku. Příklady zahrnují dokumentování háčku v rozšíření nebo dokumentování samotné šablony.
nocatdesc
Pokud je háček zcela odstraněn z verze MediaWiki nastavením yes, nezobrazí se popis kategorie.

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

Související odkazy