Localisation updates from https://translatewiki.net.
[mediawiki.git] / includes / linker / Hook / HtmlPageLinkRendererEndHook.php
blobfb3af10480be4222d454505ad0f3c9a8a201edfd
1 <?php
3 namespace MediaWiki\Linker\Hook;
5 use HtmlArmor;
6 use MediaWiki\Linker\LinkRenderer;
7 use MediaWiki\Linker\LinkTarget;
9 /**
10 * This is a hook handler interface, see docs/Hooks.md.
11 * Use the hook name "HtmlPageLinkRendererEnd" to register handlers implementing this interface.
13 * @stable to implement
14 * @ingroup Hooks
16 interface HtmlPageLinkRendererEndHook {
17 /**
18 * This hook is called when generating internal and interwiki links in LinkRenderer,
19 * just before the function returns a value.
21 * @since 1.35
23 * @param LinkRenderer $linkRenderer
24 * @param LinkTarget $target LinkTarget object that the link is pointing to
25 * @param bool $isKnown Whether the page is known or not
26 * @param string|HtmlArmor &$text Contents that the `<a>` tag should have; either a plain,
27 * unescaped string or an HtmlArmor object
28 * @param string[] &$attribs Final HTML attributes of the `<a>` tag, after processing, in
29 * associative array form
30 * @param string &$ret Value to return if your hook returns false
31 * @return bool|void True or no return value to continue or false to abort. If you return
32 * true, an `<a>` element with HTML attributes $attribs and contents $html will be
33 * returned. If you return false, $ret will be returned.
35 public function onHtmlPageLinkRendererEnd( $linkRenderer, $target, $isKnown,
36 &$text, &$attribs, &$ret