100 if ($this->
http->wrapper()->query()->has(
'type')) {
101 $type = $this->
http->wrapper()->query()->retrieve(
'type', $this->
refinery->kindlyTo()->string());
104 if ($this->
http->wrapper()->query()->has(
'mail_id')) {
105 $mail_id = $this->
http->wrapper()->query()->retrieve(
'mail_id', $this->
refinery->kindlyTo()->int());
108 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mobj_id', $this->current_folder_id);
109 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mobj_id', $this->current_folder_id);
113 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchResults');
116 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailAttachment');
118 foreach ([
'to',
'cc',
'bcc'] as $reciepient_type) {
119 $key =
'rcp_' . $reciepient_type;
122 if ($this->
http->wrapper()->query()->has($key)) {
123 $recipients = $this->
http->wrapper()->query()->retrieve(
125 $this->
refinery->kindlyTo()->string()
138 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailUser');
140 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mail_id', $mail_id);
141 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'replyMail');
142 } elseif ($type ===
'read') {
143 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mail_id);
144 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'showMail');
145 } elseif ($type ===
'deliverFile') {
147 if ($this->
http->wrapper()->post()->has(
'filename')) {
150 $this->
refinery->kindlyTo()->string()
152 } elseif ($this->
http->wrapper()->query()->has(
'filename')) {
155 $this->
refinery->kindlyTo()->string()
160 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mail_id);
161 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'deliverFile');
162 } elseif ($type ===
'message_sent') {
163 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'mail_message_send'),
true);
164 $this->
ctrl->redirectByClass(ilMailFolderGUI::class);
167 if ($this->
http->wrapper()->post()->has(
'roles')) {
168 $roles = $this->
http->wrapper()->post()->retrieve(
172 } elseif ($this->
http->wrapper()->query()->has(
'role')) {
173 $roles = [$this->
http->wrapper()->query()->retrieve(
'role', $this->
refinery->kindlyTo()->string())];
181 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailRole');
185 if ($this->
http->wrapper()->query()->has(
'view')) {
186 $view = $this->
http->wrapper()->query()->retrieve(
'view', $this->
refinery->kindlyTo()->string());
188 if ($view ===
'my_courses') {
190 if ($this->
http->wrapper()->query()->has(
'search_crs')) {
192 $this->
http->wrapper()->query()->retrieve(
'search_crs', $this->
refinery->kindlyTo()->string())
195 $this->
ctrl->setParameter($this,
'search_crs', $search_crs);
196 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchCoursesTo');
199 $this->forward_class = (string) $this->
ctrl->getNextClass($this);
202 switch (strtolower($this->forward_class)) {
203 case strtolower(ilMailFormGUI::class):
207 case strtolower(ilContactGUI::class):
208 $this->tpl->setTitle($this->
lng->txt(
'mail_addressbook'));
212 case strtolower(ilMailAttachmentGUI::class):
213 $this->tpl->setTitle($this->
lng->txt(
'mail'));
216 $this->
ctrl->forwardCommand($gui);
219 case strtolower(ilMailOptionsGUI::class):
220 $this->tpl->setTitle($this->
lng->txt(
'mail'));
224 case strtolower(ilMailFolderGUI::class):
229 if (!($cmd = $this->
ctrl->getCmd()) || !method_exists($this, $cmd)) {
230 $cmd =
'setViewMode';
static get(string $a_var)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
static http()
Fetches the global http state from ILIAS.
static set(string $a_var, $a_val)
Set a value.