Template:ExtensionHook/pl
Copy and paste template
{{ExtensionHook
|name = MyHook
|version =
|gerrit =
|removed =
|summary =
|args = $x, $y
|extension =
|source =
|sourcefunction =
|sourceclass =
|newvarname =
|newvarlink =
|nocatdesc =
}}
produces:
For more information about attaching hooks, see Podręcznik:Haki.
For examples of other extensions using this hook, see Category:MyHook extensions/pl.
Usage notes
- name
- The name of the hook. This is usually the same name as the sub-page.
- version
- The version of MediaWiki this hook was first introduced in.
- rev
- SVN revision in which this hook was first introduced. If this parameter is given, it will link to the appropriate CodeReview page (e.g. r115794).
- 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 (e.g., Gerrit change 5)
- 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
- A short description of the hook's purpose.
- 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 Podręcznik:Haki.
- args
- The arguments, as used at the top of the function.
- extension
- Extension name where hook is called; for when the source is not in the MediaWiki core code repository.
- 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 sourcefunction2.
- sourceclass
- Name of the class which calls this hook.
- newvarname
- Used by {{Removed}} or {{Deprecated}} when removed or deprecated is set.
- newvarlink
- Used by {{Removed}} or {{Deprecated}} when removed or deprecated is set.
- 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 hooks
- Hooks added in MediaWiki...
- There are times when it is undesirable to automatically categorise the hook documentation. Examples would include when documenting a hook in an extension, or when documenting the template itself.
- nocatdesc
- If a hook is removed completely from MediaWiki version by setting
yes, it will not show up the category description.
TemplateData
This is the TemplateData documentation for this template used by VisualEditor and other tools.
ExtensionHook
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 |
| Gerrit ID of deprecation | gerritdeprecated | no description | Number | optional |
| Version removed | removed | If the hook has been removed, the version of MediaWiki that it was removed in. | String | optional |
| Gerrit ID of removal | gerritremoved | no description | Number | 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 |
| Skin name | skin | Skin name where the hook is called; alternatively, set for the 'extrension' variable. | Page name | optional |
| 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 |