74 \
Psr\Http\Message\ServerRequestInterface
$request = null,
81 if (null === $this->tpl) {
82 $this->tpl = $DIC->ui()->mainTemplate();
86 if (null === $this->ctrl) {
87 $this->ctrl = $DIC->ctrl();
96 if (null === $this->lng) {
97 $this->lng = $DIC->language();
101 if (null === $this->
user) {
102 $this->
user = $DIC->user();
106 if (null === $this->request) {
107 $this->request = $DIC->http()->request();
110 $this->umail = $mail;
111 if (null === $this->umail) {
112 $this->umail = new \ilFormatMail($this->
user->getId());
115 $this->mbox = $malBox;
116 if (null === $this->mbox) {
117 $this->mbox = new \ilMailbox($this->
user->getId());
120 $this->lng->loadLanguageModule(
'mail');
121 $this->ctrl->saveParameter($this,
'mobj_id');
126 if (!$this->
settings->get(
'show_mail_settings')) {
127 $referrer = $this->request->getQueryParams()[
'referrer'] ??
'';
128 if (strtolower(
'ilPersonalSettingsGUI') === strtolower($referrer)) {
129 $this->ctrl->redirectByClass(
'ilPersonalSettingsGUI');
132 $this->ctrl->redirectByClass(
'ilMailGUI');
136 $nextClass = $this->ctrl->getNextClass($this);
137 switch ($nextClass) {
139 if (!($cmd = $this->ctrl->getCmd())) {
140 $cmd =
'showOptions';
161 if (null !== $this->form) {
165 return new \ilMailOptionsFormGUI(
178 $this->tpl->setTitle($this->lng->txt(
'mail'));
182 ilUtil::sendSuccess($this->lng->txt(
'mail_options_saved'),
true);
183 $this->ctrl->redirect($this,
'showOptions');
195 if (null ===
$form) {
199 $form->setValuesByPost();
202 $this->tpl->setContent(
$form->getHTML());
Class ilMailOptions this class handles user mails.
This class provides processing control methods.
__construct(\ilTemplate $tpl=null, \ilCtrl $ctrl=null, \ilSetting $setting=null, \ilLanguage $lng=null, \ilObjUser $user=null, \Psr\Http\Message\ServerRequestInterface $request=null, \ilFormatMail $mail=null, \ilMailbox $malBox=null)
ilMailOptionsGUI constructor.
saveOptions()
Called if the user pushes the submit button of the mail options form.
Mail Box class Base class for creating and handling mail boxes.
special template class to simplify handling of ITX/PEAR
showOptions(\ilMailOptionsFormGUI $form=null)
Called to display the mail options form.
setForm(\ilMailOptionsFormGUI $form)