MediaWiki master
|
This is a hook handler interface, see docs/Hooks.md. More...
Inherited by MediaWiki\HookContainer\HookRunner.
Public Member Functions | |
onConditionalDefaultOptionsAddCondition (array &$extraConditions) | |
This hook is called when ConditionalDefaultsLookup service is created. | |
This is a hook handler interface, see docs/Hooks.md.
Use the hook name "ConditionalDefaultOptionsAddCondition" to register handlers implementing this interface. It runs virtually on any request, although it should run once, performance of the hook run should be taken in account.
Definition at line 14 of file ConditionalDefaultOptionsAddConditionHook.php.
MediaWiki\User\Options\Hook\ConditionalDefaultOptionsAddConditionHook::onConditionalDefaultOptionsAddCondition | ( | array & | $extraConditions | ) |
This hook is called when ConditionalDefaultsLookup service is created.
Important: $extraConditions must be added and used in a property defined by the same extension. Using a condition from a missing extension will result in fatal error. See also Manual:$wgConditionalUserOptions.
array<string,callable> | &$extraConditions An empty array to add checker functions to evaluate conditions set in $wgConditionalUserOptions. The key is the name of the condition and the value a callable which will take two arguments:
|