1 <?php declare(strict_types=1);
58 ServerRequestInterface
$request = null,
65 if (null === $this->tpl) {
66 $this->tpl = $DIC->ui()->mainTemplate();
70 if (null === $this->ctrl) {
71 $this->ctrl = $DIC->ctrl();
80 if (null === $this->lng) {
81 $this->lng = $DIC->language();
85 if (null === $this->
user) {
86 $this->
user = $DIC->user();
90 if (null === $this->request) {
91 $this->request = $DIC->http()->request();
95 if (null === $this->umail) {
99 $this->mbox = $malBox;
100 if (null === $this->mbox) {
104 $this->lng->loadLanguageModule(
'mail');
105 $this->ctrl->saveParameter($this,
'mobj_id');
110 if (!$this->
settings->get(
'show_mail_settings')) {
111 $referrer = $this->request->getQueryParams()[
'referrer'] ??
'';
112 if (strtolower(
'ilPersonalSettingsGUI') === strtolower($referrer)) {
113 $this->ctrl->redirectByClass(
'ilPersonalSettingsGUI');
116 $this->ctrl->redirectByClass(
'ilMailGUI');
120 $nextClass = $this->ctrl->getNextClass($this);
121 switch ($nextClass) {
123 if (!($cmd = $this->ctrl->getCmd())) {
124 $cmd =
'showOptions';
145 if (null !== $this->form) {
162 $this->tpl->setTitle($this->lng->txt(
'mail'));
166 ilUtil::sendSuccess($this->lng->txt(
'mail_options_saved'),
true);
167 $this->ctrl->redirect($this,
'showOptions');
179 if (null ===
$form) {
183 $form->setValuesByPost();
186 $this->tpl->setContent(
$form->getHTML());
187 $this->tpl->printToStdout();
Class ilMailOptions this class handles user mails.
This class provides processing control methods.
setForm(ilMailOptionsFormGUI $form)
saveOptions()
Called if the user pushes the submit button of the mail options form.
showOptions(ilMailOptionsFormGUI $form=null)
Called to display the mail options form.
Class ilGlobalPageTemplate.
Mail Box class Base class for creating and handling mail boxes.
__construct(ilGlobalPageTemplate $tpl=null, ilCtrl $ctrl=null, ilSetting $setting=null, ilLanguage $lng=null, ilObjUser $user=null, ServerRequestInterface $request=null, ilFormatMail $mail=null, ilMailbox $malBox=null)
ilMailOptionsGUI constructor.