< Manual:Hooks 
 
      | HtmlPageLinkRendererEnd | |
|---|---|
| Available from version 1.28.0 (Gerrit change 284750) | |
| Define function: | public static function onHtmlPageLinkRendererEnd( LinkRenderer $linkRenderer, LinkTarget $target, $isKnown, &$text, &$attribs, &$ret ) { ... }
 | 
| Attach hook: | In extension.json: {
	"Hooks": {
		"HtmlPageLinkRendererEnd": "MyExtensionHooks::onHtmlPageLinkRendererEnd"
	}
}
 | 
| Called from: | File(s): linker/LinkRenderer.php | 
| Interface: | HtmlPageLinkRendererEndHook.php | 
For more information about attaching hooks, see Manual:Hooks.
For examples of extensions using this hook, see Category:HtmlPageLinkRendererEnd extensions.
Used when generating internal and interwiki links in LinkRenderer, just before the function returns a value. If you return true, or without return value, an <a> element with HTML attributes $attribs and contents $text will be returned. If you return false, $ret will be returned.
Details
- $linkRenderer: the LinkRenderer object
- $target: the LinkTarget that the link is pointing to
- $isKnown: boolean indicating whether the page is known or not
- &$text: the contents that the <a> tag should have; either a plain, unescaped string or a HtmlArmor object.
- &$attribs: the final HTML attributes of the <a> tag, after processing, in associative array form.
- &$ret: the value to return if your hook returns false.
See also
- Manual:Hooks/HtmlPageLinkRendererBegin
    This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.