3 declare(strict_types=1);
50 $this->tpl = $tpl ?? $DIC->ui()->mainTemplate();
51 $this->
ctrl = $ctrl ?? $DIC->ctrl();
52 $this->
lng = $lng ?? $DIC->language();
53 $this->
user = $user ?? $DIC->user();
54 $this->
http = $http ?? $DIC->http();
55 $this->
refinery = $refinery ?? $DIC->refinery();
58 $this->
lng->loadLanguageModule(
'mail');
59 $this->
ctrl->saveParameter($this,
'mobj_id');
64 if (!$this->mail_options->mayManageInvididualSettings()) {
66 if ($this->
http->wrapper()->query()->has(
'referrer')) {
67 $referrer = $this->
http->wrapper()->query()->retrieve(
69 $this->
refinery->kindlyTo()->string()
72 if (strtolower(ilPersonalSettingsGUI::class) === strtolower($referrer)) {
73 $this->
ctrl->redirectByClass(ilPersonalSettingsGUI::class);
75 $this->
ctrl->redirectByClass(ilMailGUI::class);
78 $nextClass = $this->
ctrl->getNextClass($this);
81 if (!($cmd = $this->
ctrl->getCmd())) {
106 $this->tpl->setTitle($this->
lng->txt(
'mail'));
110 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'mail_options_saved'),
true);
111 $this->
ctrl->redirect($this,
'showOptions');
119 if (null === $form) {
126 $this->tpl->setContent($form->
getHTML());
127 $this->tpl->printToStdout();
Interface GlobalHttpState.
Class ilMailOptions this class handles user mails.
ilMailOptionsFormGUI $form
setForm(ilMailOptionsFormGUI $form)
showOptions(ilMailOptionsFormGUI $form=null)
static http()
Fetches the global http state from ILIAS.
ilGlobalTemplateInterface $tpl
__construct(ilGlobalTemplateInterface $tpl=null, ilCtrlInterface $ctrl=null, ilLanguage $lng=null, ilObjUser $user=null, GlobalHttpState $http=null, Refinery $refinery=null, ilMailOptions $mail_options=null)
form( $class_path, string $cmd)
ilMailOptions $mail_options