MediaWiki master
MediaWiki\Linker\Hook\UserLinkRendererUserLinkPostRenderHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onUserLinkRendererUserLinkPostRender (UserIdentity $targetUser, IContextSource $context, string &$html, string &$prefix, string &$postfix)
 This hook is called after the username link HTML has been generated, and allows for adding prefix or postfix HTML.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "UserLinkRendererUserLinkPostRender" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 15 of file UserLinkRendererUserLinkPostRenderHook.php.

Member Function Documentation

◆ onUserLinkRendererUserLinkPostRender()

MediaWiki\Linker\Hook\UserLinkRendererUserLinkPostRenderHook::onUserLinkRendererUserLinkPostRender ( UserIdentity $targetUser,
IContextSource $context,
string & $html,
string & $prefix,
string & $postfix )

This hook is called after the username link HTML has been generated, and allows for adding prefix or postfix HTML.

Note that this hook may be called hundreds of times in a given request, so hook handlers implementations should consider performance of any code invoked in the handler.

Since
1.45
Parameters
UserIdentity$targetUserThe user associated with the rendered username link HTML.
IContextSource$contextThe context for viewing the username.
string&$htmlThe username link HTML generated by UserLinkRenderer
string&$prefixAn HTML fragment to add as a prefix to &$html
string&$postfixAn HTML fragment to add as a postfix to &$html
Returns
bool|void True or no return value to continue, or false to stop further processing and return $&html, &$prefix and &$postfix

The documentation for this interface was generated from the following file: