19declare(strict_types=1);
31use Psr\Http\Message\ServerRequestInterface;
39 private readonly \ilGlobalTemplateInterface
$tpl;
42 private readonly \ilLanguage
$lng;
44 private readonly ServerRequestInterface
$request;
47 private readonly \ilHelpGUI
$help;
61 $this->tpl =
$DIC[
'tpl'];
62 $this->ui_factory =
$DIC[
'ui.factory'];
63 $this->ui_renderer =
$DIC[
'ui.renderer'];
64 $this->
lng = $DIC[
'lng'];
65 $this->
ctrl = $DIC[
'ilCtrl'];
66 $this->request =
$DIC[
'http']->request();
67 $this->log =
$DIC->logger();
68 $this->mail_sender_factory =
$DIC->mail()->mime()->senderFactory();
69 $this->
help = $DIC[
'ilHelp'];
70 $this->
toolbar = $DIC[
'ilToolbar'];
71 $this->current_user =
$DIC[
'ilUser'];
73 $this->auth_session =
$DIC[
'ilAuthSession'];
74 $this->rbac_system =
$DIC[
'rbacsystem'];
76 $this->
lng->loadLanguageModule(
'user');
77 $this->
lng->loadLanguageModule(
'administration');
78 $this->
lng->loadLanguageModule(
'mail');
80 $this->
ctrl->saveParameter($this,
'user_page');
95 $this->
help->setScreenIdComponent(
'user');
96 $this->
tabs->initializeTabs();
98 switch ($this->
ctrl->getNextClass()) {
99 case strtolower(\ilLocalUserPasswordSettingsGUI::class):
100 $this->
ctrl->forwardCommand(
104 case strtolower(DeleteAccountGUI::class):
105 $this->
ctrl->forwardCommand(
114 $this->mail_sender_factory,
122 $this->tpl->setTitle($this->
lng->txt(
'personal_settings'));
123 $cmd = $this->
ctrl->getCmd(
'show') .
'Cmd';
128 public function showCmd(?StandardForm $form =
null): void
130 if ($form ===
null) {
133 $this->tpl->setContent($this->ui_renderer->render($form));
134 $this->tpl->printToStdout();
139 $form = $this->
initForm()->withRequest($this->request);
140 $data = $form->getData();
141 if (
$data ===
null) {
146 $this->current_user = $this->user_settings->saveForm(
148 [AvailablePages::MainSettings],
153 $this->tpl->setOnScreenMessage(
155 $this->
lng->txtlng(
'common',
'msg_obj_modified', $this->current_user->getLanguage()),
159 $this->
ctrl->redirectByClass([\ilDashboardGUI::class, self::class],
'show');
164 return $this->ui_factory->input()->container()->form()->standard(
165 $this->
ctrl->getFormActionByClass(self::class,
'save'),
167 'settings' => $this->ui_factory->input()->field()->section(
168 $this->user_settings->buildFormInputs(
169 [AvailablePages::MainSettings],
173 $this->lng->txt(
'settings')
Provides fluid interface to LoggingServices.
Builds a Color from either hex- or rgb values.
@ilCtrl_Calls ILIAS\User\Settings\PersonalSettingsGUI: ILIAS\User\Account\DeleteAccountGUI @ilCtrl_Ca...
readonly UIFactory $ui_factory
readonly ilMailMimeSenderFactory $mail_sender_factory
readonly ilToolbarGUI $toolbar
readonly ServerRequestInterface $request
readonly ilAuthSession $auth_session
readonly SettingsTabs $tabs
readonly SettingsImplementation $user_settings
readonly ilSetting $settings
readonly Renderer $ui_renderer
showCmd(?StandardForm $form=null)
readonly LoggingServices $log
readonly ilGlobalTemplateInterface $tpl
readonly ilRbacSystem $rbac_system
__construct()
Constructor setup ILIAS global object @access public.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...