Template:ExtensionHook

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

Şablonu kopyalayıp yapıştırın

MyHook
??? sürümünden itibaren mevcut

İşlev tanımlayın:
public static function onMyHook( $x, $y ) { ... }
Ek kanca:
$wgHooks['MyHook'][] = 'MyExtensionHooks::onMyHook';
Çağrıdan:Dosya(lar):

Kancaların takılmasıyla ilgili daha fazla bilgi için Manual:Hooks sayfasına bakın.
Bu kancayı kullanan diğer uzantı örnekleri için Category:MyHook extensions/tr sayfasına bakın.

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

Kullanım notları

name
Kancanın adı. Bu genellikle alt sayfayla aynı addır.
version
MediaWiki sürümü bu kanca ilk olarak tanıtıldı.
rev
Bu kancanın ilk kez tanıtıldığı SVN revizyonu. Bu parametre verilirse, uygun CodeReview sayfasına (ör. r115794) bağlanacaktır.
gerrit
Bu kancanın ilk tanıtıldığı Gerrit değişim numarası. Bu parametre verilirse, uygun Gerrit değişiklik kümesi sayfasına bağlanır (ör. Gerrit değişikliği 5)
removed
Kanca kaldırılmışsa, kaldırıldığı MediaWiki sürümü.
deprecated
Kanca kullanımdan kaldırılmışsa (ancak kaldırılmamışsa), kullanımdan kaldırıldığı MediaWiki sürümü.
summary
Kancanın amacının kısa bir açıklaması.
Daha ayrıntılı açıklamalar istenir ve ana sayfa içeriğine eklenmelidir.
Kısa açıklamayı güncellerseniz, lütfen Manual:Hooks üzerindeki iki tabloyu da güncelleyin.
args
İşlevin en üstünde kullanıldığı şekliyle argümanlar.
extension
Extension name where hook is called; for when the source is not in the MediaWiki core code repository.
source
Bu kancayı kodda çağıran konum (dosya adı). source2...source10 ile daha fazla konum eklenebilir.
sourcefunction
Bu kancayı çağıran işlevin adı. sourcefunction2 ile bir başkası eklenebilir.
sourceclass
Bu kancayı çağıran sınıfın adı.
newvarname
removed veya deprecated ayarlandığında {{Removed }} veya {{Deprecated }} tarafından kullanılır.
newvarlink
removed veya deprecated ayarlandığında {{Removed }} veya {{Deprecated }} tarafından kullanılır.
templatemode
Kanca belgelerinin standart MediaWiki Kategorileri'nde görünmemesi gerekiyorsa nocats olarak ayarlayın.
Varsayılan olarak, bu şablonu kullanmak belgelendirme sayfasını kategorilere yerleştirir:
  • MediaWiki kancaları
  • MediaWiki'ye eklenen kancalar...
Kanca belgelerinin otomatik olarak kategorize edilmesinin istenmeyen olduğu zamanlar vardır. Örnekler, bir uzantıdaki bir kancayı belgelerken veya şablonun kendisini belgelerken verilebilir.
nocatdesc
Bir kanca, yes ayarlanarak MediaWiki sürümünden tamamen kaldırılırsa, kategori açıklamasını göstermez.

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

Ayrıca bakınız