ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilMailTemplateGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
24use ILIAS\Refinery\Factory as Refinery;
25use ILIAS\Data\Factory as DataFactory;
26
31{
35 protected ilLanguage $lng;
41 protected Refinery $refinery;
44
45 public function __construct(
46 protected ilObject $parent_object,
48 ?ilCtrlInterface $ctrl = null,
49 ?ilLanguage $lng = null,
50 ?ilToolbarGUI $toolbar = null,
52 ?ilErrorHandling $error = null,
53 ?GlobalHttpState $http = null,
54 ?Factory $ui_factory = null,
55 ?Renderer $ui_renderer = null,
56 ?ilMailTemplateService $template_service = null
57 ) {
58 global $DIC;
59 $this->tpl = $tpl ?? $DIC->ui()->mainTemplate();
60 $this->ctrl = $ctrl ?? $DIC->ctrl();
61 $this->lng = $lng ?? $DIC->language();
62 $this->toolbar = $toolbar ?? $DIC->toolbar();
63 $this->rbacsystem = $rbacsystem ?? $DIC->rbac()->system();
64 $this->error = $error ?? $DIC['ilErr'];
65 $this->http = $http ?? $DIC->http();
66 $this->refinery = $DIC->refinery();
67 $this->ui_factory = $ui_factory ?? $DIC->ui()->factory();
68 $this->ui_renderer = $ui_renderer ?? $DIC->ui()->renderer();
69 $this->service = $template_service ?? $DIC->mail()->textTemplates();
70
71 $this->lng->loadLanguageModule('meta');
72 }
73
74 private function isEditingAllowed(): bool
75 {
76 return $this->rbacsystem->checkAccess('write', $this->parent_object->getRefId());
77 }
78
79 public function getUnsafeGetCommands(): array
80 {
81 return [
82 'executeTableAction',
83 ];
84 }
85
86 public function getSafePostCommands(): array
87 {
88 return [];
89 }
90
91 public function executeCommand(): void
92 {
93 $cmd = $this->ctrl->getCmd();
94 if (!$cmd || !method_exists($this, $cmd . 'Command')) {
95 $cmd = 'showTemplates';
96 }
97 $verified_command = $cmd . 'Command';
98
99 $this->$verified_command();
100 }
101
102 private function executeTableActionCommand(): void
103 {
104 $action = $this->http->wrapper()->query()->retrieve(
105 'mail_template_table_action',
106 $this->refinery->kindlyTo()->string()
107 );
108
109 match ($action) {
110 'showEditTemplateForm' => $this->showEditTemplateForm(),
111 'confirmDeleteTemplate' => $this->confirmDeleteTemplate(),
112 'unsetAsContextDefault' => $this->unsetAsContextDefault(),
113 'setAsContextDefault' => $this->setAsContextDefault(),
114 default => $this->ctrl->redirect($this, 'showTemplates'),
115 };
116 }
117
118 private function showTemplatesCommand(): void
119 {
121 if (count($contexts) <= 1) {
122 $this->tpl->setOnScreenMessage(
123 $this->tpl::MESSAGE_TYPE_FAILURE,
124 $this->lng->txt('mail_template_no_context_available')
125 );
126 } elseif ($this->isEditingAllowed()) {
127 $this->toolbar->addComponent(
128 $this->ui_factory->button()->standard(
129 $this->lng->txt('mail_new_template'),
130 $this->ctrl->getLinkTarget($this, 'showInsertTemplateForm')
131 )
132 );
133 }
134
135 $table_uri = (new DataFactory())->uri(
136 ILIAS_HTTP_PATH . '/'
137 . $this->ctrl->getLinkTarget($this, 'executeTableAction')
138 );
139
140 $tbl = new ilMailTemplateTable(
141 $this->http->request(),
142 $this->lng,
143 $this->ui_factory,
144 $table_uri,
145 $this->service,
146 !$this->isEditingAllowed()
147 );
148
149 $this->tpl->setContent($this->ui_renderer->render($tbl->getComponent()));
150 }
151
152 private function insertTemplateCommand(): void
153 {
154 if (!$this->isEditingAllowed()) {
155 $this->error->raiseError($this->lng->txt('msg_no_perm_write'), $this->error->WARNING);
156 }
157
158 $form = $this->getTemplateForm();
159
160 if (!$form->checkInput()) {
162 $this->showInsertTemplateFormCommand($form);
163 return;
164 }
165
166 $generic_context = new ilMailTemplateGenericContext();
167 if ($form->getInput('context') === $generic_context->getId()) {
168 $form->getItemByPostVar('context')->setAlert(
169 $this->lng->txt('mail_template_no_valid_context')
170 );
171 $form->setValuesByPost();
172 $this->showInsertTemplateFormCommand($form);
173 return;
174 }
175
176 try {
177 $this->service->createNewTemplate(
179 $form->getInput('title'),
180 $form->getInput('m_subject'),
181 $form->getInput('m_message'),
182 $form->getInput('lang')
183 );
184
185 $this->tpl->setOnScreenMessage(
186 $this->tpl::MESSAGE_TYPE_SUCCESS,
187 $this->lng->txt('saved_successfully'),
188 true
189 );
190 $this->ctrl->redirect($this, 'showTemplates');
191 } catch (\ILIAS\Mail\Templates\TemplateSubjectSyntaxException) {
192 $form->getItemByPostVar('m_subject')->setAlert($this->lng->txt('mail_template_invalid_tpl_syntax'));
193 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('form_input_not_valid'));
194 } catch (\ILIAS\Mail\Templates\TemplateMessageSyntaxException) {
195 $form->getItemByPostVar('m_message')->setAlert($this->lng->txt('mail_template_invalid_tpl_syntax'));
196 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('form_input_not_valid'));
197 } catch (Exception) {
198 $form->getItemByPostVar('context')->setAlert(
199 $this->lng->txt('mail_template_no_valid_context')
200 );
201 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('form_input_not_valid'));
202 }
203
204 $form->setValuesByPost();
205 $this->showInsertTemplateFormCommand($form);
206 }
207
209 {
210 if (!($form instanceof ilPropertyFormGUI)) {
211 $form = $this->getTemplateForm();
212 }
213
214 $this->tpl->setContent($form->getHTML());
215 }
216
217 private function updateTemplateCommand(): void
218 {
219 if (!$this->isEditingAllowed()) {
220 $this->error->raiseError($this->lng->txt('msg_no_perm_write'), $this->error->WARNING);
221 }
222
223 $template_id = 0;
224 if ($this->http->wrapper()->post()->has('tpl_id')) {
225 $template_id = $this->http->wrapper()->post()->retrieve('tpl_id', $this->refinery->kindlyTo()->int());
226 }
227
228 if (!is_numeric($template_id) || $template_id < 1) {
229 $this->tpl->setOnScreenMessage(
230 $this->tpl::MESSAGE_TYPE_FAILURE,
231 $this->lng->txt('mail_template_missing_id')
232 );
233 $this->showTemplatesCommand();
234 return;
235 }
236
237 try {
238 $form = $this->getTemplateForm();
239 if (!$form->checkInput()) {
241 $this->showEditTemplateForm($form);
242 return;
243 }
244
245 $generic_context = new ilMailTemplateGenericContext();
246 if ($form->getInput('context') === $generic_context->getId()) {
247 $form->getItemByPostVar('context')->setAlert(
248 $this->lng->txt('mail_template_no_valid_context')
249 );
250 $form->setValuesByPost();
251 $this->showEditTemplateForm($form);
252 return;
253 }
254
255 try {
256 $this->service->modifyExistingTemplate(
257 (int) $template_id,
259 $form->getInput('title'),
260 $form->getInput('m_subject'),
261 $form->getInput('m_message'),
262 $form->getInput('lang')
263 );
264
265 $this->tpl->setOnScreenMessage(
266 $this->tpl::MESSAGE_TYPE_SUCCESS,
267 $this->lng->txt('saved_successfully'),
268 true
269 );
270 $this->ctrl->redirect($this, 'showTemplates');
271 } catch (OutOfBoundsException) {
272 $this->tpl->setOnScreenMessage(
273 $this->tpl::MESSAGE_TYPE_FAILURE,
274 $this->lng->txt('mail_template_missing_id')
275 );
276 } catch (\ILIAS\Mail\Templates\TemplateSubjectSyntaxException) {
277 $form->getItemByPostVar('m_subject')->setAlert($this->lng->txt('mail_template_invalid_tpl_syntax'));
278 } catch (\ILIAS\Mail\Templates\TemplateMessageSyntaxException) {
279 $form->getItemByPostVar('m_message')->setAlert($this->lng->txt('mail_template_invalid_tpl_syntax'));
280 } catch (Exception) {
281 $form->getItemByPostVar('context')->setAlert(
282 $this->lng->txt('mail_template_no_valid_context')
283 );
284 $this->tpl->setOnScreenMessage(
285 $this->tpl::MESSAGE_TYPE_FAILURE,
286 $this->lng->txt('form_input_not_valid')
287 );
288 }
289
290 $form->setValuesByPost();
291 $this->showEditTemplateForm($form);
292 } catch (Exception) {
293 $this->tpl->setOnScreenMessage(
294 $this->tpl::MESSAGE_TYPE_FAILURE,
295 $this->lng->txt('mail_template_missing_id')
296 );
297 $this->showTemplatesCommand();
298 }
299 }
300
301 private function showEditTemplateForm(?ilPropertyFormGUI $form = null): void
302 {
303 if (!($form instanceof ilPropertyFormGUI)) {
304 $template_id = 0;
305 if ($this->http->wrapper()->query()->has('mail_template_tpl_ids')) {
306 $template_id = $this->http->wrapper()->query()->retrieve(
307 'mail_template_tpl_ids',
308 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
309 )[0];
310 }
311
312 if (!is_numeric($template_id) || $template_id < 1) {
313 $this->tpl->setOnScreenMessage(
314 $this->tpl::MESSAGE_TYPE_FAILURE,
315 $this->lng->txt('mail_template_missing_id')
316 );
317 $this->showTemplatesCommand();
318 return;
319 }
320
321 try {
322 $template = $this->service->loadTemplateForId((int) $template_id);
323 $form = $this->getTemplateForm($template);
324 $this->populateFormWithTemplate($form, $template);
325 } catch (Exception) {
326 $this->tpl->setOnScreenMessage(
327 $this->tpl::MESSAGE_TYPE_FAILURE,
328 $this->lng->txt('mail_template_missing_id')
329 );
330 $this->showTemplatesCommand();
331 return;
332 }
333 }
334
335 $this->tpl->setContent($form->getHTML());
336 }
337
339 {
341 'tpl_id' => $template->getTplId(),
342 'title' => $template->getTitle(),
343 'context' => $template->getContext(),
344 'lang' => $template->getLang(),
345 'm_subject' => $template->getSubject(),
346 'm_message' => $template->getMessage(),
347 ]);
348 }
349
350 private function confirmDeleteTemplate(): void
351 {
352 if (!$this->isEditingAllowed()) {
353 $this->error->raiseError($this->lng->txt('msg_no_perm_write'), $this->error->WARNING);
354 }
355
356 $template_ids = [];
357 if ($this->http->wrapper()->query()->has('mail_template_tpl_ids')) {
358 $template_ids = $this->http->wrapper()->query()->retrieve(
359 'mail_template_tpl_ids',
360 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string())
361 );
362 if ($template_ids === ['ALL_OBJECTS']) {
363 $template_ids = array_map(
364 static fn(array $template): int => (int) ($template['tpl_id'] ?? 0),
365 $this->service->listAllTemplatesAsArray()
366 );
367 } else {
368 $template_ids = $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
369 ->transform($template_ids);
370 }
371 }
372
373 if (count($template_ids) === 0) {
374 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('select_one'));
375 $this->showTemplatesCommand();
376 return;
377 }
378
379 $confirm = new ilConfirmationGUI();
380 $confirm->setFormAction($this->ctrl->getFormAction($this, 'deleteTemplate'));
381
382 $confirm->setHeaderText($this->lng->txt('mail_tpl_sure_delete_entries'));
383 if (count($template_ids) === 1) {
384 $confirm->setHeaderText($this->lng->txt('mail_tpl_sure_delete_entry'));
385 }
386
387 $confirm->setConfirm($this->lng->txt('confirm'), 'deleteTemplate');
388 $confirm->setCancel($this->lng->txt('cancel'), 'showTemplates');
389
390 foreach ($template_ids as $template_id) {
391 $template = $this->service->loadTemplateForId($template_id);
392 $confirm->addItem('tpl_id[]', (string) $template_id, $template->getTitle());
393 }
394
395 $this->tpl->setContent($confirm->getHTML());
396 }
397
398 protected function deleteTemplateCommand(): void
399 {
400 if (!$this->isEditingAllowed()) {
401 $this->error->raiseError($this->lng->txt('msg_no_perm_write'), $this->error->WARNING);
402 }
403
404 $template_ids = [];
405 if ($this->http->wrapper()->post()->has('tpl_id')) {
406 $template_ids = $this->http->wrapper()->post()->retrieve(
407 'tpl_id',
408 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
409 );
410 }
411 if (count($template_ids) === 0) {
412 $template_id = 0;
413 if ($this->http->wrapper()->query()->has('tpl_id')) {
414 $template_id = $this->http->wrapper()->query()->retrieve('tpl_id', $this->refinery->kindlyTo()->int());
415 }
416 $template_ids = [$template_id];
417 }
418
419 if (count($template_ids) === 0) {
420 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_FAILURE, $this->lng->txt('select_one'));
421 $this->showTemplatesCommand();
422 return;
423 }
424
425 $this->service->deleteTemplatesByIds($template_ids);
426
427 if (count($template_ids) === 1) {
428 $this->tpl->setOnScreenMessage(
429 $this->tpl::MESSAGE_TYPE_SUCCESS,
430 $this->lng->txt('mail_tpl_deleted_s'),
431 true
432 );
433 } else {
434 $this->tpl->setOnScreenMessage(
435 $this->tpl::MESSAGE_TYPE_SUCCESS,
436 $this->lng->txt('mail_tpl_deleted_p'),
437 true
438 );
439 }
440 $this->ctrl->redirect($this, 'showTemplates');
441 }
442
443 private function getAjaxPlaceholdersByIdCommand(): void
444 {
445 $trigger_value = '';
446 if ($this->http->wrapper()->query()->has('triggerValue')) {
447 $trigger_value = $this->http->wrapper()->query()->retrieve(
448 'triggerValue',
449 $this->refinery->kindlyTo()->string()
450 );
451 }
452 $context_id = ilUtil::stripSlashes($trigger_value);
453
454 $placeholders = new ilManualPlaceholderInputGUI(
455 $this->lng->txt('mail_form_placeholders_label'),
456 'm_placeholders',
457 'm_message'
458 );
459 $placeholders->setInstructionText($this->lng->txt('mail_nacc_use_placeholder'));
460 try {
461 $placeholders->setAdviseText(sprintf($this->lng->txt('placeholders_advise'), '<br />'));
462 } catch (Throwable) {
463 $placeholders->setAdviseText($this->lng->txt('placeholders_advise'));
464 }
465
467 foreach ($context->getPlaceholders() as $value) {
468 $placeholders->addPlaceholder($value['placeholder'], $value['label']);
469 }
470
471 $placeholders->render(true);
472 }
473
474 private function getTemplateForm(?ilMailTemplate $template = null): ilPropertyFormGUI
475 {
476 $form = new ilPropertyFormGUI();
477
478 $title = new ilTextInputGUI($this->lng->txt('mail_template_title'), 'title');
479 $title->setRequired(true);
480 $title->setDisabled(!$this->isEditingAllowed());
481 $form->addItem($title);
482
483 $context = new ilRadioGroupInputGUI($this->lng->txt('mail_template_context'), 'context');
484 $context->setDisabled(!$this->isEditingAllowed());
486
487 if (count($contexts) <= 1) {
488 $this->tpl->setOnScreenMessage(
489 $this->tpl::MESSAGE_TYPE_FAILURE,
490 $this->lng->txt('mail_template_no_context_available'),
491 true
492 );
493 $this->ctrl->redirect($this, 'showTemplates');
494 }
495
496 $context_sort = [];
497 $context_options = [];
498 $generic_context = new ilMailTemplateGenericContext();
499 foreach ($contexts as $ctx) {
500 if ($ctx->getId() !== $generic_context->getId()) {
501 $context_options[$ctx->getId()] = $ctx;
502 $context_sort[$ctx->getId()] = $ctx->getTitle();
503 }
504 }
505 asort($context_sort);
506 $first = null;
507 foreach (array_keys($context_sort) as $id) {
508 $ctx = $context_options[$id];
509 $option = new ilRadioOption($ctx->getTitle(), $ctx->getId());
510 $option->setInfo($ctx->getDescription());
511 $context->addOption($option);
512
513 if (!$first) {
514 $first = $id;
515 }
516 }
517 $context->setValue($first);
518 $context->setRequired(true);
520
521 $hidden = new ilHiddenInputGUI('lang');
522 $hidden->setValue($this->lng->getLangKey());
523 $form->addItem($hidden);
524
525 $subject = new ilTextInputGUI($this->lng->txt('subject'), 'm_subject');
526 $subject->setDisabled(!$this->isEditingAllowed());
527 $subject->setSize(50);
528 $form->addItem($subject);
529
530 $message = new ilTextAreaInputGUI($this->lng->txt('message'), 'm_message');
531 $message->setDisabled(!$this->isEditingAllowed());
532 $message->setRequired(true);
533 $message->setCols(60);
534 $message->setRows(10);
535 $form->addItem($message);
536
537 $placeholders = new ilManualPlaceholderInputGUI(
538 $this->lng->txt('mail_form_placeholders_label'),
539 'm_placeholders',
540 'm_message'
541 );
542 $placeholders->setDisabled(!$this->isEditingAllowed());
543 $placeholders->setInstructionText($this->lng->txt('mail_nacc_use_placeholder'));
544 try {
545 $placeholders->setAdviseText(sprintf($this->lng->txt('placeholders_advise'), '<br />'));
546 } catch (Throwable) {
547 $placeholders->setAdviseText($this->lng->txt('placeholders_advise'));
548 }
549 $placeholders->supportsRerenderSignal(
550 'context',
551 $this->ctrl->getLinkTarget($this, 'getAjaxPlaceholdersById', '', true)
552 );
553 if ($template === null) {
554 $context_id = $generic_context->getId();
555 } else {
556 $context_id = $template->getContext();
557 }
559 foreach ($context->getPlaceholders() as $value) {
560 $placeholders->addPlaceholder($value['placeholder'], $value['label']);
561 }
562 $form->addItem($placeholders);
563 if ($template instanceof ilMailTemplate && $template->getTplId() > 0) {
564 $id = new ilHiddenInputGUI('tpl_id');
565 $form->addItem($id);
566
567 $form->setTitle($this->lng->txt('mail_edit_tpl'));
568 $form->setFormAction($this->ctrl->getFormAction($this, 'updateTemplate'));
569
570 if ($this->isEditingAllowed()) {
571 $form->addCommandButton('updateTemplate', $this->lng->txt('save'));
572 }
573 } else {
574 $form->setTitle($this->lng->txt('mail_create_tpl'));
575 $form->setFormAction($this->ctrl->getFormAction($this, 'insertTemplate'));
576
577 if ($this->isEditingAllowed()) {
578 $form->addCommandButton('insertTemplate', $this->lng->txt('save'));
579 }
580 }
581
582 if ($this->isEditingAllowed()) {
583 $form->addCommandButton('showTemplates', $this->lng->txt('cancel'));
584 } else {
585 $form->addCommandButton('showTemplates', $this->lng->txt('back'));
586 }
587
588 return $form;
589 }
590
591 public function unsetAsContextDefault(): void
592 {
593 if (!$this->isEditingAllowed()) {
594 $this->error->raiseError($this->lng->txt('msg_no_perm_write'), $this->error->WARNING);
595 }
596
597 $template_id = 0;
598 if ($this->http->wrapper()->query()->has('mail_template_tpl_ids')) {
599 $template_id = $this->http->wrapper()->query()->retrieve(
600 'mail_template_tpl_ids',
601 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
602 )[0];
603 }
604
605 if (!is_numeric($template_id) || $template_id < 1) {
606 $this->tpl->setOnScreenMessage(
607 $this->tpl::MESSAGE_TYPE_FAILURE,
608 $this->lng->txt('mail_template_missing_id')
609 );
610 $this->showTemplatesCommand();
611 return;
612 }
613
614 try {
615 $template = $this->service->loadTemplateForId((int) $template_id);
616 $this->service->unsetAsContextDefault($template);
617 } catch (Exception) {
618 $this->tpl->setOnScreenMessage(
619 $this->tpl::MESSAGE_TYPE_FAILURE,
620 $this->lng->txt('mail_template_missing_id')
621 );
622 $this->showTemplatesCommand();
623 return;
624 }
625
626 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('saved_successfully'), true);
627 $this->ctrl->redirect($this, 'showTemplates');
628 }
629
630 private function setAsContextDefault(): void
631 {
632 if (!$this->isEditingAllowed()) {
633 $this->error->raiseError($this->lng->txt('msg_no_perm_write'), $this->error->WARNING);
634 }
635
636 $template_id = 0;
637 if ($this->http->wrapper()->query()->has('mail_template_tpl_ids')) {
638 $template_id = $this->http->wrapper()->query()->retrieve(
639 'mail_template_tpl_ids',
640 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
641 )[0];
642 }
643
644 if (!is_numeric($template_id) || $template_id < 1) {
645 $this->tpl->setOnScreenMessage(
646 $this->tpl::MESSAGE_TYPE_FAILURE,
647 $this->lng->txt('mail_template_missing_id')
648 );
649 $this->showTemplatesCommand();
650 return;
651 }
652
653 try {
654 $template = $this->service->loadTemplateForId((int) $template_id);
655 $this->service->setAsContextDefault($template);
656 } catch (Exception) {
657 $this->tpl->setOnScreenMessage(
658 $this->tpl::MESSAGE_TYPE_FAILURE,
659 $this->lng->txt('mail_template_missing_id')
660 );
661 $this->showTemplatesCommand();
662 return;
663 }
664
665 $this->tpl->setOnScreenMessage($this->tpl::MESSAGE_TYPE_SUCCESS, $this->lng->txt('saved_successfully'), true);
666 $this->ctrl->redirect($this, 'showTemplates');
667 }
668}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Builds a Color from either hex- or rgb values.
Definition: Factory.php:31
Builds data types.
Definition: Factory.php:36
error(string $a_errmsg)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Error Handling & global info handling.
setFormAction(string $a_formaction)
This class represents a hidden form property in a property form.
language handling
static getTemplateContexts(?array $a_id=null)
Returns an array of mail template contexts, the key of each entry matches its id.
@ilCtrl_isCalledBy ilMailTemplateGUI: ilObjMailGUI
ilGlobalTemplateInterface $tpl
showEditTemplateForm(?ilPropertyFormGUI $form=null)
showInsertTemplateFormCommand(?ilPropertyFormGUI $form=null)
getTemplateForm(?ilMailTemplate $template=null)
getUnsafeGetCommands()
This method must return a list of unsafe GET commands.
getSafePostCommands()
This method must return a list of safe POST commands.
ilMailTemplateService $service
populateFormWithTemplate(ilPropertyFormGUI $form, ilMailTemplate $template)
__construct(protected ilObject $parent_object, ?ilGlobalTemplateInterface $tpl=null, ?ilCtrlInterface $ctrl=null, ?ilLanguage $lng=null, ?ilToolbarGUI $toolbar=null, ?ilRbacSystem $rbacsystem=null, ?ilErrorHandling $error=null, ?GlobalHttpState $http=null, ?Factory $ui_factory=null, ?Renderer $ui_renderer=null, ?ilMailTemplateService $template_service=null)
Class ilObject Basic functions for all objects.
This class represents a property form user interface.
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
getItemByPostVar(string $a_post_var)
This class represents a property in a property form.
This class represents an option in a radio group.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This class represents a text area property in a property form.
This class represents a text property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
Interface GlobalHttpState.
This is how the factory for UI elements looks.
Definition: Factory.php:38
An entity that renders components to a string output.
Definition: Renderer.php:31
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static http()
Fetches the global http state from ILIAS.
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.
RFC 822 Email address list validation Utility.
global $DIC
Definition: shib_login.php:26
$context
Definition: webdav.php:31
$message
Definition: xapiexit.php:31