wiki.techinc.nl/includes/user/Hook/UserGetDefaultOptionsHook.php
Peter Ovchyn 45140daa29 Avoid using User ::getDefaultOption, ::getDefaultOptions
This patch hard-deprecates the methods above

Bug: T276035
Change-Id: Ic36b0702f7547acce0d162d6e0b54bbd4ecf4d81
2021-03-16 17:24:17 +02:00

26 lines
905 B
PHP

<?php
namespace MediaWiki\User\Hook;
/**
* This is a hook handler interface, see docs/Hooks.md.
* Use the hook name "UserGetDefaultOptions" to register handlers implementing this interface.
*
* @stable to implement
* @ingroup Hooks
*/
interface UserGetDefaultOptionsHook {
/**
* 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
*
* @param array &$defaultOptions Array of preference keys and their default values.
* @return bool|void True or no return value to continue or false to abort
*/
public function onUserGetDefaultOptions( &$defaultOptions );
}