$user = $this->getUser();
}
- $htmlForm = Preferences::getFormObject( $user, $this->getContext() );
+ $htmlForm = $this->getFormObject( $user, $this->getContext() );
$htmlForm->setSubmitCallback( [ 'Preferences', 'tryUISubmit' ] );
$sectionTitles = $htmlForm->getPreferenceSections();
$htmlForm->show();
}
+ /**
+ * Get the preferences form to use.
+ * @param User $user The user.
+ * @param IContextSource $context The context.
+ * @return PreferencesForm|HtmlForm
+ */
+ protected function getFormObject( $user, IContextSource $context ) {
+ return Preferences::getFormObject( $user, $context );
+ }
+
private function showResetForm() {
if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) {
throw new PermissionsError( 'editmyoptions' );