MediaWiki master
MediaWiki\User\Hook\UserRequirementsConditionDisplayHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onUserRequirementsConditionDisplay (string|int $type, array $args, IContextSource $context, ?MessageSpecifier &$messageSpec)
 Use this hook to specify a custom message for displaying user requirements conditions in the user interface.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 15 of file UserRequirementsConditionDisplayHook.php.

Member Function Documentation

◆ onUserRequirementsConditionDisplay()

MediaWiki\User\Hook\UserRequirementsConditionDisplayHook::onUserRequirementsConditionDisplay ( string|int $type,
array $args,
IContextSource $context,
?MessageSpecifier & $messageSpec )

Use this hook to specify a custom message for displaying user requirements conditions in the user interface.

By default, conditions are displayed using the message "listgrouprights-restrictedgroups-cond-$type", with all arguments passed as parameters to the message. By implementing this hook, extensions can specify a different message key or apply preprocessing to the arguments before passing them to the message.

Since
1.46
Parameters
string | int$typeThe condition type
array$argsArguments to the condition
IContextSource$contextThe context of the request where the condition is being displayed.
null | MessageSpecifier&$messageSpecThe message to use. If null, the default message will be used.

Implemented in MediaWiki\HookContainer\HookRunner.


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