MediaWiki master
MediaWiki\User\Options\ConditionalDefaultsLookup Class Reference

Public Member Functions

 __construct (ServiceOptions $options, UserRegistrationLookup $userRegistrationLookup, UserIdentityUtils $userIdentityUtils, callable $userGroupManagerCallback)
 
 getConditionallyDefaultOptions ()
 Get all conditionally default user options.
 
 getOptionDefaultForUser (string $optionName, UserIdentity $userIdentity)
 Get the conditional default for user and option.
 
 hasConditionalDefault (string $option)
 Does the option support conditional defaults?
 

Public Attributes

const CONSTRUCTOR_OPTIONS
 

Detailed Description

Definition at line 14 of file ConditionalDefaultsLookup.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\User\Options\ConditionalDefaultsLookup::__construct ( ServiceOptions $options,
UserRegistrationLookup $userRegistrationLookup,
UserIdentityUtils $userIdentityUtils,
callable $userGroupManagerCallback )

Member Function Documentation

◆ getConditionallyDefaultOptions()

MediaWiki\User\Options\ConditionalDefaultsLookup::getConditionallyDefaultOptions ( )

Get all conditionally default user options.

Returns
string[]

Definition at line 64 of file ConditionalDefaultsLookup.php.

◆ getOptionDefaultForUser()

MediaWiki\User\Options\ConditionalDefaultsLookup::getOptionDefaultForUser ( string $optionName,
UserIdentity $userIdentity )

Get the conditional default for user and option.

Parameters
string$optionName
UserIdentity$userIdentity
Returns
mixed|null The default value if set, or null if it cannot be determined conditionally (default from DefaultOptionsLookup should be used in that case).

Definition at line 78 of file ConditionalDefaultsLookup.php.

◆ hasConditionalDefault()

MediaWiki\User\Options\ConditionalDefaultsLookup::hasConditionalDefault ( string $option)

Does the option support conditional defaults?

Parameters
string$option
Returns
bool

Definition at line 52 of file ConditionalDefaultsLookup.php.

Member Data Documentation

◆ CONSTRUCTOR_OPTIONS

const MediaWiki\User\Options\ConditionalDefaultsLookup::CONSTRUCTOR_OPTIONS
Initial value:
= [
]
const ConditionalUserOptions
Name constant for the ConditionalUserOptions setting, for use with Config::get()
Access: internal
Exposed for ServiceWiring only

Definition at line 19 of file ConditionalDefaultsLookup.php.


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