99 : void
100 {
101 $type = '';
102 if ($this->
http->wrapper()->query()->has(
'type')) {
103 $type = $this->
http->wrapper()->query()->retrieve(
'type', $this->
refinery->kindlyTo()->string());
104 }
105 $mail_id = 0;
106 if ($this->
http->wrapper()->query()->has(
'mail_id')) {
107 $mail_id = $this->
http->wrapper()->query()->retrieve(
'mail_id', $this->
refinery->kindlyTo()->int());
108 }
109
110 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mobj_id', $this->current_folder_id);
111 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mobj_id', $this->current_folder_id);
112
115 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchResults');
118 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailAttachment');
120 foreach (['to', 'cc', 'bcc'] as $reciepient_type) {
121 $key = 'rcp_' . $reciepient_type;
122
123 $recipients = '';
124 if ($this->
http->wrapper()->query()->has($key)) {
125 $recipients = $this->
http->wrapper()->query()->retrieve(
126 $key,
127 $this->
refinery->kindlyTo()->string()
128 );
129 }
130
132
137 }
138 }
140 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailUser');
142 $this->
ctrl->setParameterByClass(ilMailFormGUI::class,
'mail_id', $mail_id);
143 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'replyMail');
144 } elseif ($type === 'read') {
145 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mail_id);
146 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'showMail');
147 } elseif ($type === 'deliverFile') {
149 if ($this->
http->wrapper()->post()->has(
'filename')) {
151 'filename',
152 $this->
refinery->kindlyTo()->string()
153 );
154 } elseif ($this->
http->wrapper()->query()->has(
'filename')) {
156 'filename',
157 $this->
refinery->kindlyTo()->string()
158 );
159 }
160
162 $this->
ctrl->setParameterByClass(ilMailFolderGUI::class,
'mail_id', $mail_id);
163 $this->
ctrl->redirectByClass(ilMailFolderGUI::class,
'deliverFile');
164 } elseif ($type === 'message_sent') {
165 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'mail_message_send'),
true);
166 $this->
ctrl->redirectByClass(ilMailFolderGUI::class);
168 $roles = [];
169 if ($this->
http->wrapper()->post()->has(
'roles')) {
170 $roles = $this->
http->wrapper()->post()->retrieve(
171 'roles',
172 $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string())
173 );
174 } elseif ($this->
http->wrapper()->query()->has(
'role')) {
175 $roles = [$this->
http->wrapper()->query()->retrieve(
'role', $this->
refinery->kindlyTo()->string())];
176 }
177
178 if ($roles !== []) {
180 }
181
183 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'mailRole');
184 }
185
186 $view = '';
187 if ($this->
http->wrapper()->query()->has(
'view')) {
188 $view = $this->
http->wrapper()->query()->retrieve(
'view', $this->
refinery->kindlyTo()->string());
189 }
190 if ($view === 'my_courses') {
191 $search_crs = '';
192 if ($this->
http->wrapper()->query()->has(
'search_crs')) {
194 $this->
http->wrapper()->query()->retrieve(
'search_crs', $this->refinery->kindlyTo()->string())
195 );
196 }
197 $this->
ctrl->setParameter($this,
'search_crs', $search_crs);
198 $this->
ctrl->redirectByClass(ilMailFormGUI::class,
'searchCoursesTo');
199 }
200
201 $this->forward_class = (string) $this->
ctrl->getNextClass($this);
203
204 switch (strtolower($this->forward_class)) {
205 case strtolower(ilMailFormGUI::class):
207 break;
208
209 case strtolower(ilMailAttachmentGUI::class):
210 $this->tpl->setTitle($this->
lng->txt(
'mail_attachments'));
212 $gui->manage();
213 $this->
ctrl->forwardCommand($gui);
214 break;
215
216 case strtolower(ilMailOptionsGUI::class):
217 $this->tpl->setTitle($this->
lng->txt(
'mail_options'));
219 break;
220
221 case strtolower(ilMailFolderGUI::class):
223 break;
224
225 default:
226 if (!($cmd = $this->
ctrl->getCmd()) || !method_exists($this, $cmd)) {
227 $cmd = 'setViewMode';
228 }
229
230 $this->{$cmd}();
231 break;
232 }
233 }
@ilCtrl_Calls ilMailFolderGUI: ILIAS\User\Profile\PublicProfileGUI
static get(string $a_var)
static set(string $a_var, $a_val)
Set a value.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")