|
MediaWiki master
|
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. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "UserRequirementsCondition" to register handlers implementing this interface.
Definition at line 15 of file UserRequirementsConditionDisplayHook.php.
| 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.
| string | int | $type | The condition type |
| array | $args | Arguments to the condition |
| IContextSource | $context | The context of the request where the condition is being displayed. |
| null | MessageSpecifier | &$messageSpec | The message to use. If null, the default message will be used. |
Implemented in MediaWiki\HookContainer\HookRunner.