MediaWiki master
PreferencesFactory.php
Go to the documentation of this file.
1<?php
8
13
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}
Object handling generic submission, CSRF protection, layout and other logic for UI forms in a reusabl...
Definition HTMLForm.php:207
User class for the MediaWiki software.
Definition User.php:130
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').