MediaWiki
master
PreferencesFactory.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\Preferences
;
22
23
use
MediaWiki\Context\IContextSource
;
24
use
MediaWiki\HTMLForm\HTMLForm
;
25
use
MediaWiki\User\User
;
26
use
PreferencesFormOOUI
;
27
54
interface
PreferencesFactory
{
55
65
public
function
getForm
(
66
User
$user,
67
IContextSource
$contextSource,
68
$formClass = PreferencesFormOOUI::class,
69
array $remove = []
70
);
71
78
public
function
getFormDescriptor
(
User
$user,
IContextSource
$contextSource );
79
85
public
function
getSaveBlacklist
();
86
102
public
function
getResetKinds
(
103
User
$user,
104
IContextSource
$context,
105
$options =
null
106
): array;
107
131
public
function
listResetKinds
();
132
144
public
function
getOptionNamesForReset
(
145
User
$user,
146
IContextSource
$context,
147
$kinds
148
);
149
}
MediaWiki\HTMLForm\HTMLForm
Object handling generic submission, CSRF protection, layout and other logic for UI forms in a reusabl...
Definition
HTMLForm.php:209
MediaWiki\User\User
internal since 1.36
Definition
User.php:93
PreferencesFormOOUI
Form to edit user preferences.
Definition
PreferencesFormOOUI.php:33
MediaWiki\Context\IContextSource
Interface for objects which can provide a MediaWiki context on request.
Definition
IContextSource.php:71
MediaWiki\Preferences\PreferencesFactory
A PreferencesFactory is a MediaWiki service that provides the definitions of preferences for a given ...
Definition
PreferencesFactory.php:54
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:21
includes
preferences
PreferencesFactory.php
Generated on Fri Nov 15 2024 01:26:15 for MediaWiki by
1.10.0