MediaWiki  1.33.0
Preferences Class Reference

This class has been replaced by the PreferencesFactory service. More...

Static Public Member Functions

static cleanSignature ( $signature, $alldata, $form)
 
static datetimePreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static editingPreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static filesPreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static generateSkinOptions ( $user, IContextSource $context)
 
static getDateOptions (IContextSource $context)
 
static getFormObject ( $user, IContextSource $context, $formClass=PreferencesFormLegacy::class, array $remove=[])
 
static getImageSizes (IContextSource $context)
 
static getOptionFromUser ( $name, $info, $user)
 Pull option from a user account. More...
 
static getPreferences ( $user, IContextSource $context)
 
static getThumbSizes (IContextSource $context)
 
static loadPreferenceValues ( $user, $context, &$defaultPreferences)
 Loads existing values for a given array of preferences. More...
 
static miscPreferences ( $user, IContextSource $context, &$defaultPreferences)
 Dummy, kept for backwards-compatibility. More...
 
static profilePreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static rcPreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static renderingPreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static searchPreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static skinPreferences ( $user, IContextSource $context, &$defaultPreferences)
 
static validateSignature ( $signature, $alldata, $form)
 
static watchlistPreferences ( $user, IContextSource $context, &$defaultPreferences)
 

Static Protected Member Functions

static getDefaultPreferencesFactory ()
 A shim to maintain backwards-compatibility of this class, basically replicating the default behaviour of the PreferencesFactory service but not permitting overriding. More...
 

Detailed Description

This class has been replaced by the PreferencesFactory service.

Deprecated:
since 1.31 use the PreferencesFactory service instead.

Definition at line 30 of file Preferences.php.

Member Function Documentation

◆ cleanSignature()

static Preferences::cleanSignature (   $signature,
  $alldata,
  $form 
)
static
Parameters
string$signature
array$alldata
HTMLForm$form
Returns
string

Definition at line 252 of file Preferences.php.

◆ datetimePreferences()

static Preferences::datetimePreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences
Returns
void

Definition at line 127 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ editingPreferences()

static Preferences::editingPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences

Definition at line 151 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ filesPreferences()

static Preferences::filesPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences

Definition at line 114 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ generateSkinOptions()

static Preferences::generateSkinOptions (   $user,
IContextSource  $context 
)
static
Parameters
User$user
IContextSource$context
Returns
array Text/links to display as key; $skinkey as value

Definition at line 207 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ getDateOptions()

static Preferences::getDateOptions ( IContextSource  $context)
static
Parameters
IContextSource$context
Returns
array

Definition at line 216 of file Preferences.php.

◆ getDefaultPreferencesFactory()

static Preferences::getDefaultPreferencesFactory ( )
staticprotected

A shim to maintain backwards-compatibility of this class, basically replicating the default behaviour of the PreferencesFactory service but not permitting overriding.

Returns
DefaultPreferencesFactory

Definition at line 37 of file Preferences.php.

References $linkRenderer, and $services.

Referenced by getFormObject(), and getPreferences().

◆ getFormObject()

static Preferences::getFormObject (   $user,
IContextSource  $context,
  $formClass = PreferencesFormLegacy::class,
array  $remove = [] 
)
static
Parameters
User$user
IContextSource$context
string$formClass
array$removeArray of items to remove
Returns
PreferencesFormLegacy|HTMLForm

Definition at line 263 of file Preferences.php.

References $context, $user, getDefaultPreferencesFactory(), and wfDeprecated().

◆ getImageSizes()

static Preferences::getImageSizes ( IContextSource  $context)
static
Parameters
IContextSource$context
Returns
array

Definition at line 224 of file Preferences.php.

◆ getOptionFromUser()

static Preferences::getOptionFromUser (   $name,
  $info,
  $user 
)
static

Pull option from a user account.

Handles stuff like array-type preferences.

Parameters
string$name
array$info
User$user
Returns
array|string

Definition at line 81 of file Preferences.php.

◆ getPreferences()

static Preferences::getPreferences (   $user,
IContextSource  $context 
)
static

◆ getThumbSizes()

static Preferences::getThumbSizes ( IContextSource  $context)
static
Parameters
IContextSource$context
Returns
array

Definition at line 232 of file Preferences.php.

◆ loadPreferenceValues()

static Preferences::loadPreferenceValues (   $user,
  $context,
$defaultPreferences 
)
static

Loads existing values for a given array of preferences.

Exceptions
MWException
Parameters
User$user
IContextSource$context
array&$defaultPreferencesArray to load values for
Returns
array|null

Definition at line 69 of file Preferences.php.

◆ miscPreferences()

static Preferences::miscPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static

Dummy, kept for backwards-compatibility.

Parameters
User$user
IContextSource$context
array&$defaultPreferences

Definition at line 198 of file Preferences.php.

References wfDeprecated().

◆ profilePreferences()

static Preferences::profilePreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences
Returns
void

Definition at line 91 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ rcPreferences()

static Preferences::rcPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences

Definition at line 163 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ renderingPreferences()

static Preferences::renderingPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences

Definition at line 139 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ searchPreferences()

static Preferences::searchPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences

Definition at line 185 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ skinPreferences()

static Preferences::skinPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences
Returns
void

Definition at line 104 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().

◆ validateSignature()

static Preferences::validateSignature (   $signature,
  $alldata,
  $form 
)
static
Parameters
string$signature
array$alldata
HTMLForm$form
Returns
bool|string

Definition at line 242 of file Preferences.php.

◆ watchlistPreferences()

static Preferences::watchlistPreferences (   $user,
IContextSource  $context,
$defaultPreferences 
)
static
Parameters
User$user
IContextSource$context
array&$defaultPreferences

Definition at line 173 of file Preferences.php.

References $context, $user, getPreferences(), and wfDeprecated().


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