MediaWiki
master
PreferencesFactory.php
Go to the documentation of this file.
1
<?php
7
namespace
MediaWiki\Preferences
;
8
9
use
MediaWiki\Context\IContextSource
;
10
use
MediaWiki\HTMLForm\HTMLForm
;
11
use
MediaWiki\Specials\Forms\PreferencesFormOOUI
;
12
use
MediaWiki\User\User
;
13
40
interface
PreferencesFactory
{
41
51
public
function
getForm
(
52
User
$user,
53
IContextSource
$contextSource,
54
$formClass = PreferencesFormOOUI::class,
55
array $remove = []
56
);
57
64
public
function
getFormDescriptor
(
User
$user,
IContextSource
$contextSource );
65
71
public
function
getSaveBlacklist
();
72
88
public
function
getResetKinds
(
89
User
$user,
90
IContextSource
$context,
91
$options =
null
92
): array;
93
117
public
function
listResetKinds
();
118
130
public
function
getOptionNamesForReset
(
131
User
$user,
132
IContextSource
$context,
133
$kinds
134
);
135
}
MediaWiki\HTMLForm\HTMLForm
Object handling generic submission, CSRF protection, layout and other logic for UI forms in a reusabl...
Definition
HTMLForm.php:207
MediaWiki\Specials\Forms\PreferencesFormOOUI
Form to edit user preferences.
Definition
PreferencesFormOOUI.php:30
MediaWiki\User\User
User class for the MediaWiki software.
Definition
User.php:130
MediaWiki\Context\IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition
IContextSource.php:57
MediaWiki\Preferences\PreferencesFactory
A PreferencesFactory is a MediaWiki service that provides the definitions of preferences for a given ...
Definition
PreferencesFactory.php:40
MediaWiki\Preferences\PreferencesFactory\getResetKinds
getResetKinds(User $user, IContextSource $context, $options=null)
Return an associative array mapping preferences keys to the kind of a preference they're used for.
MediaWiki\Preferences\PreferencesFactory\getOptionNamesForReset
getOptionNamesForReset(User $user, IContextSource $context, $kinds)
Get the list of option names which have been saved by the user, thus having non-default values,...
MediaWiki\Preferences\PreferencesFactory\getFormDescriptor
getFormDescriptor(User $user, IContextSource $contextSource)
Get the preferences form descriptor.
MediaWiki\Preferences\PreferencesFactory\getForm
getForm(User $user, IContextSource $contextSource, $formClass=PreferencesFormOOUI::class, array $remove=[])
Get the preferences form for a given user.
MediaWiki\Preferences\PreferencesFactory\listResetKinds
listResetKinds()
Return a list of the types of user options currently returned by getResetKinds().
MediaWiki\Preferences\PreferencesFactory\getSaveBlacklist
getSaveBlacklist()
Get the names of preferences that should never be saved (such as 'realname' and 'emailaddress').
MediaWiki\Preferences
Definition
DefaultPreferencesFactory.php:7
includes
Preferences
PreferencesFactory.php
Generated on Mon Mar 16 2026 17:25:58 for MediaWiki by
1.10.0