Template:ExtensionHook/cs
Zkopírování šablony a její vložení
| MyHook | |
|---|---|
| Available from version ??? |
|
| Define function: | public static function onMyHook( $x, $y ) { ... }
|
| Attach hook: | $wgHooks['MyHook'][] = 'MyExtensionHooks::onMyHook';
|
| Called from: | File(s): |
For more information about attaching hooks, see Manual:Hooks.
For examples of other extensions using this hook, see 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 Manual:Hooks.
- 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.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Template mode | templatemode | no description | String | optional |
| Name | name | The name of the hook. This is usually the same name as the sub-page. | String | required |
| SVN revision introduced | rev | SVN revision in which this hook was first introduced. If this parameter is given, it will link to the appropriate CodeReview page. | String | optional |
| Gerrit changeset introduced | gerrit | Gerrit change number in which this hook was first introduced. If this parameter is given, it will link to the appropriate Gerrit changeset page. | Number | suggested |
| Version introduced | version | The version of MediaWiki this hook was first introduced in. | String | suggested |
| Version deprecated | deprecated | If the hook has been deprecated, the version of MediaWiki that it was deprecated in. | String | optional |
| Version removed | removed | If the hook has been removed, the version of MediaWiki that it was removed in. | String | optional |
| Replacement name | newvarname | If the hook is either deprecated or removed, name the feature that replaces this hook, if there is any replacement. | String | optional |
| Replacement link | newvarlink | If the hook is either deprecated or removed, link to the feature that replaces this hook, if there is any replacement. | Page name | optional |
| Summary | summary | A short description of the hook's purpose. More detailed descriptions are desirable, and should be added to the main page content. | String | suggested |
| Arguments | args | The arguments that are defined by the hook signature. | String | required |
| Extension name | extension | Extension name where the hook is called; for when the source is not in the MediaWiki core code repository. | Page name | required |
| Source 1 | source | Location (file name) which calls this hook in the code. | String | suggested |
| Source 2 | source2 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 3 | source3 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 4 | source4 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 5 | source5 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 6 | source6 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 7 | source7 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 8 | source8 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 9 | source9 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source 10 | source10 | Location (file name) which calls this hook in the code, if another source exists | String | optional |
| Source class | sourceclass | The fully qualified class name (FQCN) which calls this hook. | String | suggested |
| Source function | sourcefunction | Name of the function which calls this hook | String | suggested |
| Source function 2 | sourcefunction2 | Name of the function which calls this hook, if another functions call this hook | String | optional |
| No category description | nocatdesc | Allows to hide the category hook description if the hook was removed completely from MediaWiki version. | String | optional |