Manual:Linker.php

From MediaWiki.org
Jump to navigation Jump to search

Other languages:
Deutsch • ‎English • ‎español • ‎polski • ‎português do Brasil • ‎日本語

Details[edit]

Linker.php splits off some of the internal bits from Skin.php . Linker's functions are used primarily for page content: links, embedded images, table of contents. Links are also used in the skin. For the moment, Skin is a descendent class of Linker. In the future, it should probably be further split so that every other bit of the wiki doesn't have to go loading up Skin to get at it. Linker contains methods to create internal, external or image links and implements page existence detection. To use this class, use $wgUser->getSkin().

Functions[edit]

Hooks[edit]

Hooks called from this file are listed in the MediaWiki hooks included in Linker.php category. They include:

Version Hook Description
(deprecated in 1.14.0) BrokenLink Don't use this; use LinkBegin or LinkEnd instead.
1.14.0 DoEditSectionLink Override the HTML generated for section edit links.
(deprecated in 1.14.0) EditSectionLink Don't use this; use DoEditSectionLink instead.
(deprecated in 1.14.0) EditSectionLinkForOther Don't use this; use DoEditSectionLink instead.
1.13.0 ImageBeforeProduceHTML Called before producing the HTML created by a wiki image insertion
1.14.0 LinkBegin Used when generating internal and interwiki links in Linker::link(), before processing starts.
1.14.0 LinkEnd Used when generating internal and interwiki links in Linker::link(), just before the function returns a value.
1.13.0 LinkerMakeExternalImage Called before the HTML for external images is returned, used for modifying external image HTML
1.13.0 LinkerMakeExternalLink Called before the HTML for external links is returned, used for modifying external link HTML
1.24.0 SelfLinkBegin Called when rendering a self link.

See also[edit]