ILIAS  release_8 Revision v8.24
class.ilMailingListsGUI.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21use ILIAS\Refinery\Factory as Refinery;
22
28{
29 private \ILIAS\HTTP\GlobalHttpState $http;
30 private Refinery $refinery;
41
42 public function __construct()
43 {
44 global $DIC;
45
46 $this->tpl = $DIC->ui()->mainTemplate();
47 $this->ctrl = $DIC['ilCtrl'];
48 $this->lng = $DIC['lng'];
49 $this->rbacsystem = $DIC['rbacsystem'];
50 $this->user = $DIC['ilUser'];
51 $this->error = $DIC['ilErr'];
52 $this->toolbar = $DIC['ilToolbar'];
53 $this->http = $DIC->http();
54 $this->refinery = $DIC->refinery();
55
56 $this->umail = new ilFormatMail($this->user->getId());
57 $this->mlists = new ilMailingLists($this->user);
58 $this->mlists->setCurrentMailingList(
59 $this->http->wrapper()->query()->has('ml_id')
60 ? $this->http->wrapper()->query()->retrieve('ml_id', $this->refinery->kindlyTo()->int())
61 : 0
62 );
63
64 $this->ctrl->saveParameter($this, 'mobj_id');
65 $this->ctrl->saveParameter($this, 'ref');
66 }
67
68 public function executeCommand(): bool
69 {
70 if (
71 !ilBuddySystem::getInstance()->isEnabled() ||
72 (
73 0 === count(ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()) &&
74 !$this->mlists->hasAny()
75 )
76 ) {
77 $this->error->raiseError($this->lng->txt('msg_no_perm_read'), $this->error->MESSAGE);
78 }
79
80 $forward_class = $this->ctrl->getNextClass($this);
81
82 switch ($forward_class) {
83 default:
84 if (!($cmd = $this->ctrl->getCmd())) {
85 $cmd = 'showMailingLists';
86 }
87
88 $this->$cmd();
89 break;
90 }
91
92
93 return true;
94 }
95
99 private function getMailingListIdsFromRequest(): array
100 {
101 $ml_ids = [];
102 if ($this->http->wrapper()->query()->has('ml_id')) {
103 $ml_ids = [
104 $this->http->wrapper()->query()->retrieve('ml_id', $this->refinery->kindlyTo()->int())
105 ];
106 } elseif ($this->http->wrapper()->post()->has('ml_id')) {
107 $ml_ids = $this->http->wrapper()->post()->retrieve(
108 'ml_id',
109 $this->refinery->kindlyTo()->listOf(
110 $this->refinery->kindlyTo()->int()
111 )
112 );
113 }
114
115 return array_filter($ml_ids);
116 }
117
118 public function confirmDelete(): bool
119 {
120 $ml_ids = $this->getMailingListIdsFromRequest();
121 if ($ml_ids === []) {
122 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_select_one_entry'));
123 $this->showMailingLists();
124 return true;
125 }
126
127 $c_gui = new ilConfirmationGUI();
128
129 $c_gui->setFormAction($this->ctrl->getFormAction($this, 'performDelete'));
130 $c_gui->setHeaderText($this->lng->txt('mail_sure_delete_entry'));
131 $c_gui->setCancel($this->lng->txt('cancel'), 'showMailingLists');
132 $c_gui->setConfirm($this->lng->txt('confirm'), 'performDelete');
133
134 $entries = $this->mlists->getSelected($ml_ids);
135 foreach ($entries as $entry) {
136 $c_gui->addItem('ml_id[]', (string) $entry->getId(), $entry->getTitle());
137 }
138
139 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
140 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.mail_mailing_lists_list.html', 'Services/Contact');
141 $this->tpl->setVariable('DELETE_CONFIRMATION', $c_gui->getHTML());
142
143 $this->tpl->printToStdout();
144
145 return true;
146 }
147
148 public function performDelete(): bool
149 {
150 if ($this->http->wrapper()->post()->has('ml_id')) {
151 $ml_ids = array_filter(
152 $this->http->wrapper()->post()->retrieve(
153 'ml_id',
154 $this->refinery->kindlyTo()->listOf(
155 $this->refinery->kindlyTo()->int()
156 )
157 )
158 );
159
160 $counter = 0;
161 foreach ($ml_ids as $id) {
162 if ($this->mlists->isOwner($id, $this->user->getId())) {
163 $this->mlists->get($id)->delete();
164 ++$counter;
165 }
166 }
167
168 if ($counter) {
169 $this->tpl->setOnScreenMessage('success', $this->lng->txt('mail_deleted_entry'));
170 }
171 } else {
172 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('mail_delete_error'));
173 }
174
175 $this->showMailingLists();
176
177 return true;
178 }
179
180 public function mailToList(): bool
181 {
182 // check if current user may send mails
183 $mail = new ilMail($this->user->getId());
184 $mailing_allowed = $this->rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId());
185
186 if (!$mailing_allowed) {
187 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('no_permission'));
188 return true;
189 }
190
191 $ml_ids = $this->getMailingListIdsFromRequest();
192 if ($ml_ids === []) {
193 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_select_one_entry'));
194 $this->showMailingLists();
195 return true;
196 }
197
198 $mail_data = $this->umail->retrieveFromStage();
199 $lists = [];
200 foreach ($ml_ids as $id) {
201 if ($this->mlists->isOwner($id, $this->user->getId()) &&
202 !$this->umail->existsRecipient('#il_ml_' . $id, (string) $mail_data['rcp_to'])) {
203 $lists['#il_ml_' . $id] = '#il_ml_' . $id;
204 }
205 }
206
207 if (count($lists)) {
208 $mail_data = $this->umail->appendSearchResult(array_values($lists), 'to');
209 $this->umail->persistToStage(
210 (int) $mail_data['user_id'],
211 $mail_data['attachments'],
212 $mail_data['rcp_to'],
213 $mail_data['rcp_cc'],
214 $mail_data['rcp_bcc'],
215 $mail_data['m_subject'],
216 $mail_data['m_message'],
217 $mail_data['use_placeholders'],
218 $mail_data['tpl_ctx_id'],
219 $mail_data['tpl_ctx_params']
220 );
221 }
222
223 ilUtil::redirect("ilias.php?baseClass=ilMailGUI&type=search_res");
224
225 return true;
226 }
227
228 public function showMailingLists(): bool
229 {
230 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
231 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.mail_mailing_lists_list.html', 'Services/Contact');
232
233 // check if current user may send mails
234 $mail = new ilMail($this->user->getId());
235 $mailing_allowed = $this->rbacsystem->checkAccess('internal_mail', $mail->getMailObjectReferenceId());
236
237 $tbl = new ilMailingListsTableGUI($this, 'showMailingLists');
238
239 $create_btn = ilLinkButton::getInstance();
240 $create_btn->setCaption('create');
241 $create_btn->setUrl($this->ctrl->getLinkTarget($this, 'showForm'));
242 $this->toolbar->addButtonInstance($create_btn);
243
244 $result = [];
245 $entries = $this->mlists->getAll();
246 if (count($entries)) {
247 $tbl->enable('select_all');
248 $counter = 0;
249
250 foreach ($entries as $entry) {
251 if ($entry->getMode() === ilMailingList::MODE_TEMPORARY) {
252 continue;
253 }
254
255 $result[$counter]['check'] = ilLegacyFormElementsUtil::formCheckbox(false, 'ml_id[]', (string) $entry->getId());
256 $result[$counter]['title'] = $entry->getTitle() . " [#il_ml_" . $entry->getId() . "]";
257 $result[$counter]['description'] = $entry->getDescription() ?? '';
258 $result[$counter]['members'] = count($entry->getAssignedEntries());
259
260 $this->ctrl->setParameter($this, 'ml_id', $entry->getId());
261
262 $current_selection_list = new ilAdvancedSelectionListGUI();
263 $current_selection_list->setListTitle($this->lng->txt("actions"));
264 $current_selection_list->setId("act_" . $counter);
265
266 $current_selection_list->addItem(
267 $this->lng->txt("edit"),
268 '',
269 $this->ctrl->getLinkTarget($this, "showForm")
270 );
271 $current_selection_list->addItem(
272 $this->lng->txt("members"),
273 '',
274 $this->ctrl->getLinkTarget($this, "showMembersList")
275 );
276 if ($mailing_allowed) {
277 $current_selection_list->addItem(
278 $this->lng->txt("send_mail_to"),
279 '',
280 $this->ctrl->getLinkTarget($this, "mailToList")
281 );
282 }
283 $current_selection_list->addItem(
284 $this->lng->txt("delete"),
285 '',
286 $this->ctrl->getLinkTarget($this, "confirmDelete")
287 );
288
289 $result[$counter]['COMMAND_SELECTION_LIST'] = $current_selection_list->getHTML();
290 ++$counter;
291 }
292
293 if ($mailing_allowed) {
294 $tbl->addMultiCommand('mailToList', $this->lng->txt('send_mail_to'));
295 }
296 $tbl->addMultiCommand('confirmDelete', $this->lng->txt('delete'));
297 } else {
298 $tbl->disable('header');
299 $tbl->disable('footer');
300 }
301
302 $tbl->setData($result);
303
304 if (
305 $this->http->wrapper()->query()->has('ref') &&
306 $this->http->wrapper()->query()->retrieve('ref', $this->refinery->kindlyTo()->string()) === 'mail') {
307 $tbl->addCommandButton('cancel', $this->lng->txt('cancel'));
308 }
309
310 $this->tpl->setVariable('MAILING_LISTS', $tbl->getHTML());
311 $this->tpl->printToStdout();
312 return true;
313 }
314
315 public function cancel(): void
316 {
317 if (
318 $this->http->wrapper()->query()->has('ref') &&
319 $this->http->wrapper()->query()->retrieve('ref', $this->refinery->kindlyTo()->string()) === 'mail') {
320 $this->ctrl->returnToParent($this);
321 }
322
323 $this->showMailingLists();
324 }
325
326 public function saveForm(): void
327 {
328 if ($this->mlists->getCurrentMailingList() && $this->mlists->getCurrentMailingList()->getId()) {
329 if (!$this->mlists->isOwner($this->mlists->getCurrentMailingList()->getId(), $this->user->getId())) {
330 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
331 }
332
333 $this->ctrl->setParameter($this, 'ml_id', $this->mlists->getCurrentMailingList()->getId());
334 $this->initForm('edit');
335 } else {
336 $this->initForm();
337 }
338
339 if ($this->form_gui->checkInput()) {
340 $this->mlists->getCurrentMailingList()->setTitle(
341 $this->form_gui->getInput('title')
342 );
343 $this->mlists->getCurrentMailingList()->setDescription(
344 $this->form_gui->getInput('description')
345 );
346 if ($this->mlists->getCurrentMailingList()->getId()) {
347 $this->mlists->getCurrentMailingList()->setChangedate(date('Y-m-d H:i:s'));
348 $this->mlists->getCurrentMailingList()->update();
349 } else {
350 $this->mlists->getCurrentMailingList()->setCreatedate(date('Y-m-d H:i:s'));
351 $this->mlists->getCurrentMailingList()->insert();
352 }
353
354 $this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'), true);
355 $this->ctrl->redirect($this, 'showMailingLists');
356 }
357
358 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
359 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.mail_mailing_lists_form.html', 'Services/Contact');
360
361 $this->form_gui->setValuesByPost();
362
363 $this->tpl->setVariable('FORM', $this->form_gui->getHTML());
364 $this->tpl->printToStdout();
365 }
366
367 private function initForm(string $a_type = 'create'): void
368 {
369 $this->form_gui = new ilPropertyFormGUI();
370
371 $this->form_gui->setFormAction($this->ctrl->getFormAction($this, 'saveForm'));
372 $this->form_gui->setTitle($this->lng->txt('mail_mailing_list'));
373
374 $titleGui = new ilTextInputGUI($this->lng->txt('title'), 'title');
375 $titleGui->setRequired(true);
376 $this->form_gui->addItem($titleGui);
377
378 $descriptionGui = new ilTextAreaInputGUI($this->lng->txt('description'), 'description');
379 $descriptionGui->setCols(40);
380 $descriptionGui->setRows(8);
381 $this->form_gui->addItem($descriptionGui);
382
383 $this->form_gui->addCommandButton('saveForm', $this->lng->txt('save'));
384 $this->form_gui->addCommandButton('showMailingLists', $this->lng->txt('cancel'));
385 }
386
387 private function setValuesByObject(): void
388 {
389 $this->form_gui->setValuesByArray([
390 'title' => $this->mlists->getCurrentMailingList()->getTitle(),
391 'description' => $this->mlists->getCurrentMailingList()->getDescription() ?? ''
392 ]);
393 }
394
395 private function setDefaultValues(): void
396 {
397 $this->form_gui->setValuesByArray([
398 'title' => '',
399 'description' => ''
400 ]);
401 }
402
403 public function showForm(): void
404 {
405 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
406 $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.mail_mailing_lists_form.html', 'Services/Contact');
407
408 if ($this->mlists->getCurrentMailingList() && $this->mlists->getCurrentMailingList()->getId()) {
409 if (!$this->mlists->isOwner($this->mlists->getCurrentMailingList()->getId(), $this->user->getId())) {
410 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
411 }
412
413 $this->ctrl->setParameter($this, 'ml_id', $this->mlists->getCurrentMailingList()->getId());
414 $this->initForm('edit');
415 $this->setValuesByObject();
416 } else {
417 $this->initForm();
418 $this->setDefaultValues();
419 }
420
421 $this->tpl->setVariable('FORM', $this->form_gui->getHTML());
422 $this->tpl->printToStdout();
423 }
424
425 public function showMembersList(): bool
426 {
427 if (!$this->mlists->getCurrentMailingList()->getId()) {
428 $this->showMailingLists();
429 return true;
430 }
431
432 $this->ctrl->setParameter($this, 'ml_id', $this->mlists->getCurrentMailingList()->getId());
433
434 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
435 $this->tpl->addBlockFile(
436 'ADM_CONTENT',
437 'adm_content',
438 'tpl.mail_mailing_lists_members.html',
439 'Services/Contact'
440 );
441
442 $tbl = new ilMailingListsMembersTableGUI($this, 'showMembersList', $this->mlists->getCurrentMailingList());
443 $result = [];
444
445 $availale_usr_ids = array_diff(
446 array_map(
447 static function (ilBuddySystemRelation $relation): int {
448 return $relation->getBuddyUsrId();
449 },
450 ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations()->toArray()
451 ),
452 array_map(
453 static function (array $entry): int {
454 return $entry['usr_id'];
455 },
456 $this->mlists->getCurrentMailingList()->getAssignedEntries()
457 ),
458 );
459
460 if (count($availale_usr_ids) > 0) {
461 $create_btn = ilLinkButton::getInstance();
462 $create_btn->setCaption('add');
463 $create_btn->setUrl($this->ctrl->getLinkTarget($this, 'showAssignmentForm'));
464 $this->toolbar->addButtonInstance($create_btn);
465 }
466
467 $assigned_entries = $this->mlists->getCurrentMailingList()->getAssignedEntries();
468 if (count($assigned_entries)) {
469 $tbl->enable('select_all');
470 $tbl->setSelectAllCheckbox('a_id');
471
472 $usr_ids = [];
473 foreach ($assigned_entries as $entry) {
474 $usr_ids[] = $entry['usr_id'];
475 }
476
477 $names = ilUserUtil::getNamePresentation($usr_ids, false, false, '', false, false, false);
478
479 $counter = 0;
480 foreach ($assigned_entries as $entry) {
481 $result[$counter]['check'] = ilLegacyFormElementsUtil::formCheckbox(false, 'a_id[]', (string) $entry['a_id']);
482 $result[$counter]['user'] = $names[$entry['usr_id']];
483 ++$counter;
484 }
485
486 $tbl->addMultiCommand('confirmDeleteMembers', $this->lng->txt('delete'));
487 } else {
488 $tbl->disable('header');
489 $tbl->disable('footer');
490
491 $tbl->setNoEntriesText($this->lng->txt('mail_search_no'));
492 }
493
494 $tbl->setData($result);
495
496 $this->tpl->setVariable('MEMBERS_LIST', $tbl->getHTML());
497 $this->tpl->printToStdout();
498 return true;
499 }
500
501 public function confirmDeleteMembers(): bool
502 {
503 if (!$this->http->wrapper()->post()->has('a_id')) {
504 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_select_one_entry'));
505 $this->showMembersList();
506 return true;
507 }
508
509 $c_gui = new ilConfirmationGUI();
510 $this->ctrl->setParameter($this, 'ml_id', $this->mlists->getCurrentMailingList()->getId());
511 $c_gui->setFormAction($this->ctrl->getFormAction($this, 'performDeleteMembers'));
512 $c_gui->setHeaderText($this->lng->txt('mail_sure_delete_entry'));
513 $c_gui->setCancel($this->lng->txt('cancel'), 'showMembersList');
514 $c_gui->setConfirm($this->lng->txt('confirm'), 'performDeleteMembers');
515
516 $assigned_entries = $this->mlists->getCurrentMailingList()->getAssignedEntries();
517
518 $usr_ids = [];
519 foreach ($assigned_entries as $entry) {
520 $usr_ids[] = $entry['usr_id'];
521 }
522
523 $names = ilUserUtil::getNamePresentation($usr_ids, false, false, '', false, false, false);
524
525 $requested_entry_ids = $this->http->wrapper()->post()->retrieve(
526 'a_id',
527 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
528 );
529
530 foreach ($assigned_entries as $entry) {
531 if (in_array($entry['a_id'], $requested_entry_ids, true)) {
532 $c_gui->addItem('a_id[]', (string) $entry['a_id'], $names[$entry['usr_id']]);
533 }
534 }
535
536 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
537 $this->tpl->addBlockFile(
538 'ADM_CONTENT',
539 'adm_content',
540 'tpl.mail_mailing_lists_members.html',
541 'Services/Contact'
542 );
543 $this->tpl->setVariable('DELETE_CONFIRMATION', $c_gui->getHTML());
544
545 $this->tpl->printToStdout();
546 return true;
547 }
548
549 public function performDeleteMembers(): bool
550 {
551 if (!$this->mlists->isOwner($this->mlists->getCurrentMailingList()->getId(), $this->user->getId())) {
552 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
553 }
554
555 if (
556 $this->http->wrapper()->post()->has('a_id') &&
557 ($requested_entry_ids = $this->http->wrapper()->post()->retrieve(
558 'a_id',
559 $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int())
560 )) !== []
561 ) {
562 $assigned_entries = $this->mlists->getCurrentMailingList()->getAssignedEntries();
563 foreach ($requested_entry_ids as $id) {
564 if (isset($assigned_entries[$id])) {
565 $this->mlists->getCurrentMailingList()->deleteEntry($id);
566 }
567 }
568 $this->tpl->setOnScreenMessage('success', $this->lng->txt('mail_deleted_entry'));
569 } else {
570 $this->tpl->setOnScreenMessage('failure', $this->lng->txt('mail_delete_error'));
571 }
572
573 $this->showMembersList();
574
575 return true;
576 }
577
578
579 protected function getAssignmentForm(): ilPropertyFormGUI
580 {
581 $form = new ilPropertyFormGUI();
582 $this->ctrl->setParameter($this, 'ml_id', $this->mlists->getCurrentMailingList()->getId());
583 $form->setFormAction($this->ctrl->getFormAction($this, 'saveAssignmentForm'));
584 $form->setTitle(sprintf($this->lng->txt('mail_assign_entry_to_mailing_list'), $this->mlists->getCurrentMailingList()->getTitle()));
585
586 $options = [];
587 $options[''] = $this->lng->txt('please_select');
588
589 $relations = ilBuddyList::getInstanceByGlobalUser()->getLinkedRelations();
591 array_keys($relations->toArray()),
592 false,
593 false,
594 '',
595 false,
596 false,
597 false
598 );
599 foreach ($relations as $relation) {
601 $options[$relation->getBuddyUsrId()] = $names[$relation->getBuddyUsrId()];
602 }
603
604 $assigned_entries = $this->mlists->getCurrentMailingList()->getAssignedEntries();
605 if (count($assigned_entries)) {
606 foreach ($assigned_entries as $assigned_entry) {
607 if (array_key_exists($assigned_entry['usr_id'], $options)) {
608 unset($options[$assigned_entry['usr_id']]);
609 }
610 }
611 }
612
613 if (count($options) > 1) {
614 $formItem = new ilSelectInputGUI($this->lng->txt('mail_entry_of_contacts'), 'usr_id');
615 $formItem->setRequired(true);
616 $formItem->setOptions($options);
617 $form->addItem($formItem);
618
619 $form->addCommandButton('saveAssignmentForm', $this->lng->txt('assign'));
620 } elseif (count($options) === 1 && count($relations) > 0) {
621 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_mailing_lists_all_contact_entries_assigned'), true);
622 $this->ctrl->redirect($this, 'showMembersList');
623 } elseif (count($relations) === 0) {
624 $this->tpl->setOnScreenMessage('info', $this->lng->txt('mail_mailing_lists_no_contact_entries'), true);
625 $this->ctrl->redirect($this, 'showMembersList');
626 }
627 $form->addCommandButton('showMembersList', $this->lng->txt('cancel'));
628
629 return $form;
630 }
631
632
633 public function saveAssignmentForm(): bool
634 {
635 if (!$this->mlists->isOwner($this->mlists->getCurrentMailingList()->getId(), $this->user->getId())) {
636 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
637 }
638
639 $form = $this->getAssignmentForm();
640 if (!$form->checkInput()) {
641 $form->setValuesByPost();
642 $this->showAssignmentForm($form);
643 return true;
644 }
645
646 if (
647 ilBuddyList::getInstanceByGlobalUser()->getRelationByUserId(
648 $this->http->wrapper()->post()->retrieve('usr_id', $this->refinery->kindlyTo()->int())
649 )->isLinked()
650 ) {
651 $this->mlists->getCurrentMailingList()->assignUser(
652 $this->http->wrapper()->post()->retrieve('usr_id', $this->refinery->kindlyTo()->int())
653 );
654 $this->tpl->setOnScreenMessage('success', $this->lng->txt('saved_successfully'));
655 $this->showMembersList();
656 return true;
657 }
658
659 $this->showAssignmentForm($form);
660 return true;
661 }
662
663
664 public function showAssignmentForm(?ilPropertyFormGUI $form = null): bool
665 {
666 if (!$this->mlists->getCurrentMailingList()->getId()) {
667 $this->showMembersList();
668 return true;
669 }
670
671 if (!$this->mlists->isOwner($this->mlists->getCurrentMailingList()->getId(), $this->user->getId())) {
672 $this->error->raiseError($this->lng->txt('permission_denied'), $this->error->MESSAGE);
673 }
674
675 $this->tpl->setTitle($this->lng->txt('mail_addressbook'));
676 $this->tpl->addBlockFile(
677 'ADM_CONTENT',
678 'adm_content',
679 'tpl.mail_mailing_lists_members_form.html',
680 'Services/Contact'
681 );
682
683 if (!($form instanceof ilPropertyFormGUI)) {
684 $form = $this->getAssignmentForm();
685 }
686
687 $this->tpl->setVariable('FORM', $form->getHTML());
688 $this->tpl->printToStdout();
689
690 return true;
691 }
692}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Builds data types.
Definition: Factory.php:21
error(string $a_errmsg)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByGlobalUser()
Class ilBuddySystemRelation.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Error Handling & global info handling uses PEAR error class.
language handling
static formCheckbox(bool $checked, string $varname, string $value, bool $disabled=false)
ilPropertyFormGUI $form_gui
initForm(string $a_type='create')
ilGlobalTemplateInterface $tpl
showAssignmentForm(?ilPropertyFormGUI $form=null)
ILIAS HTTP GlobalHttpState $http
User class.
This class represents a property form user interface.
class ilRbacSystem system function like checkAccess, addActiveRole ... Supporting system functions ar...
This class represents a selection list property in a property form.
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 getNamePresentation( $a_user_id, bool $a_user_image=false, bool $a_profile_link=false, string $a_profile_back_link="", bool $a_force_first_lastname=false, bool $a_omit_login=false, bool $a_sortable=true, bool $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static redirect(string $a_script)
global $DIC
Definition: feed.php:28
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.