Go to the documentation of this file.
38 $services = MediaWikiServices::getInstance();
39 $authManager = AuthManager::singleton();
43 $config,
$services->getContentLanguage(), $authManager,
46 return $preferencesFactory;
53 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
64 return $preferencesFactory->getFormDescriptor(
$user,
$context );
76 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
88 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
223 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
231 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
239 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
249 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
259 throw new Exception( __METHOD__ .
'() is deprecated and does nothing now' );
276 return $preferencesFactory->getForm(
$user,
$context, $formClass, $remove );
284 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
293 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
302 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
314 throw new Exception( __METHOD__ .
'() is deprecated and does nothing' );
static getPreferences( $user, IContextSource $context)
static getThumbSizes(IContextSource $context)
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
static filterTimezoneInput( $tz, $alldata)
static rcPreferences( $user, IContextSource $context, &$defaultPreferences)
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
static editingPreferences( $user, IContextSource $context, &$defaultPreferences)
static getTimeZoneList(Language $language)
Get a list of all time zones.
static searchPreferences( $user, IContextSource $context, &$defaultPreferences)
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
static filterIntval( $value, $alldata)
static getDateOptions(IContextSource $context)
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
static getSaveBlacklist()
This class has been replaced by the PreferencesFactory service.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
static generateSkinOptions( $user, IContextSource $context)
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
static validateSignature( $signature, $alldata, $form)
static miscPreferences( $user, IContextSource $context, &$defaultPreferences)
Dummy, kept for backwards-compatibility.
Allows to change the fields on the form that will be generated $name
static watchlistPreferences( $user, IContextSource $context, &$defaultPreferences)
static skinPreferences( $user, IContextSource $context, &$defaultPreferences)
static getFormObject( $user, IContextSource $context, $formClass=PreferencesFormLegacy::class, array $remove=[])
Interface for objects which can provide a MediaWiki context on request.
static profilePreferences( $user, IContextSource $context, &$defaultPreferences)
static getTimezoneOptions(IContextSource $context)
static getDefaultPreferencesFactory()
A shim to maintain backwards-compatibility of this class, basically replicating the default behaviour...
you have access to all of the normal MediaWiki so you can get a DB use the etc For full docs on the Maintenance class
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title e g db for database replication lag or jobqueue for job queue size converted to pseudo seconds It is possible to add more fields and they will be returned to the user in the API response after the basic globals have been set but before ordinary actions take place or wrap services the preferred way to define a new service is the $wgServiceWiringFiles array $services
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency MediaWikiServices
static getImageSizes(IContextSource $context)
static filesPreferences( $user, IContextSource $context, &$defaultPreferences)
static getOptionFromUser( $name, $info, $user)
Pull option from a user account.
static loadPreferenceValues( $user, $context, &$defaultPreferences)
Loads existing values for a given array of preferences.
static renderingPreferences( $user, IContextSource $context, &$defaultPreferences)
Internationalisation code.
static cleanSignature( $signature, $alldata, $form)
static datetimePreferences( $user, IContextSource $context, &$defaultPreferences)