1 <?php declare(strict_types=1);
58 ServerRequestInterface
$request = null,
66 if (null === $this->tpl) {
67 $this->tpl = $DIC->ui()->mainTemplate();
71 if (null === $this->ctrl) {
72 $this->ctrl = $DIC->ctrl();
76 if (null === $this->lng) {
77 $this->lng = $DIC->language();
81 if (null === $this->
user) {
82 $this->
user = $DIC->user();
86 if (null === $this->request) {
87 $this->request = $DIC->http()->request();
91 if (null === $this->umail) {
95 $this->mbox = $malBox;
96 if (null === $this->mbox) {
101 $this->lng->loadLanguageModule(
'mail');
102 $this->ctrl->saveParameter($this,
'mobj_id');
107 if (!$this->mail_options->mayManageInvididualSettings()) {
108 $referrer = $this->request->getQueryParams()[
'referrer'] ??
'';
109 if (strtolower(
'ilPersonalSettingsGUI') === strtolower($referrer)) {
110 $this->ctrl->redirectByClass(
'ilPersonalSettingsGUI');
113 $this->ctrl->redirectByClass(
'ilMailGUI');
117 $nextClass = $this->ctrl->getNextClass($this);
118 switch ($nextClass) {
120 if (!($cmd = $this->ctrl->getCmd())) {
121 $cmd =
'showOptions';
142 if (null !== $this->form) {
159 $this->tpl->setTitle($this->lng->txt(
'mail'));
163 ilUtil::sendSuccess($this->lng->txt(
'mail_options_saved'),
true);
164 $this->ctrl->redirect($this,
'showOptions');
176 if (null ===
$form) {
180 $form->setValuesByPost();
183 $this->tpl->setContent(
$form->getHTML());
184 $this->tpl->printToStdout();
Class ilMailOptions this class handles user mails.
This class provides processing control methods.
__construct(ilGlobalPageTemplate $tpl=null, ilCtrl $ctrl=null, ilLanguage $lng=null, ilObjUser $user=null, ServerRequestInterface $request=null, ilFormatMail $mail=null, ilMailbox $malBox=null, ilMailOptions $mail_options=null)
ilMailOptionsGUI constructor.
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.