MediaWiki master
PreferencesFactory.php
Go to the documentation of this file.
1<?php
21namespace MediaWiki\Preferences;
22
27
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}
Object handling generic submission, CSRF protection, layout and other logic for UI forms in a reusabl...
Definition HTMLForm.php:209
internal since 1.36
Definition User.php:93
Form to edit user preferences.
Interface for objects which can provide a MediaWiki context on request.
A PreferencesFactory is a MediaWiki service that provides the definitions of preferences for a given ...
getResetKinds(User $user, IContextSource $context, $options=null)
Return an associative array mapping preferences keys to the kind of a preference they're used for.
getOptionNamesForReset(User $user, IContextSource $context, $kinds)
Get the list of option names which have been saved by the user, thus having non-default values,...
getFormDescriptor(User $user, IContextSource $contextSource)
Get the preferences form descriptor.
getForm(User $user, IContextSource $contextSource, $formClass=PreferencesFormOOUI::class, array $remove=[])
Get the preferences form for a given user.
listResetKinds()
Return a list of the types of user options currently returned by getResetKinds().
getSaveBlacklist()
Get the names of preferences that should never be saved (such as 'realname' and 'emailaddress').