MediaWiki REL1_32
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 filterIntval ( $value, $alldata)
 
static filterTimezoneInput ( $tz, $alldata)
 
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.
 
static getPreferences ( $user, IContextSource $context)
 
static getSaveBlacklist ()
 
static getThumbSizes (IContextSource $context)
 
static getTimeZoneList (Language $language)
 Get a list of all time zones.
 
static getTimezoneOptions (IContextSource $context)
 
static loadPreferenceValues ( $user, $context, &$defaultPreferences)
 Loads existing values for a given array of preferences.
 
static miscPreferences ( $user, IContextSource $context, &$defaultPreferences)
 Dummy, kept for backwards-compatibility.
 
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.
 

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 258 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 133 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 157 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 120 of file Preferences.php.

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

◆ filterIntval()

static Preferences::filterIntval (   $value,
  $alldata 
)
static
Parameters
string$value
array$alldata
Returns
int

Definition at line 292 of file Preferences.php.

◆ filterTimezoneInput()

static Preferences::filterTimezoneInput (   $tz,
  $alldata 
)
static
Parameters
string$tz
array$alldata
Returns
string

Definition at line 301 of file Preferences.php.

◆ 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 213 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 222 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 269 of file Preferences.php.

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

◆ getImageSizes()

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

Definition at line 230 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 87 of file Preferences.php.

◆ getPreferences()

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

◆ getSaveBlacklist()

static Preferences::getSaveBlacklist ( )
static
Returns
array

Definition at line 52 of file Preferences.php.

◆ getThumbSizes()

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

Definition at line 238 of file Preferences.php.

◆ getTimeZoneList()

static Preferences::getTimeZoneList ( Language  $language)
static

Get a list of all time zones.

Parameters
Language$languageLanguage used for the localized names
Returns
array A list of all time zones. The system name of the time zone is used as key and the value is an array which contains localized name, the timecorrection value used for preferences and the region
Since
1.26

Definition at line 313 of file Preferences.php.

◆ getTimezoneOptions()

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

Definition at line 283 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 75 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 204 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 97 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 169 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 145 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 191 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 110 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 248 of file Preferences.php.

◆ watchlistPreferences()

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

Definition at line 179 of file Preferences.php.

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


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