MediaWiki  master
Go to the documentation of this file.
1 <?php
21 namespace MediaWiki\Preferences;
23 use HTMLForm;
24 use IContextSource;
26 use User;
54 interface PreferencesFactory {
65  public function getForm(
66  User $user,
67  IContextSource $contextSource,
68  $formClass = PreferencesFormOOUI::class,
69  array $remove = []
70  );
78  public function getFormDescriptor( User $user, IContextSource $contextSource );
85  public function getSaveBlacklist();
86 }
Object handling generic submission, CSRF protection, layout and other logic for UI forms in a reusabl...
Definition: HTMLForm.php:150
Form to edit user preferences.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
Definition: User.php:70
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 ...
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.
Get the names of preferences that should never be saved (such as 'realname' and 'emailaddress').