MediaWiki REL1_40
MediaWiki\User\Hook\UserGetDefaultOptionsHook Interface Reference

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

Inherited by MediaWiki\HookContainer\HookRunner.

Public Member Functions

 onUserGetDefaultOptions (&$defaultOptions)
 This hook is called after fetching core default user options but before returning the options.
 

Detailed Description

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

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

Stability: stable
to implement

Definition at line 12 of file UserGetDefaultOptionsHook.php.

Member Function Documentation

◆ onUserGetDefaultOptions()

MediaWiki\User\Hook\UserGetDefaultOptionsHook::onUserGetDefaultOptions ( & $defaultOptions)

This hook is called after fetching core default user options but before returning the options.

Warning: This hook is called for every call to UserOptionsLookup::getDefaultOptions(), which means it's potentially called dozens or hundreds of times. You may want to cache the results of non-trivial operations in your hook function for this reason.

Since
1.35
Parameters
array&$defaultOptionsArray of preference keys and their default values.
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


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