ILIAS  release_8 Revision v8.24
class.ilObjStudyProgrammeAutoMembershipsGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
29
38{
39 private const ROLEFOLDER_REF_ID = 8;
40 public const CHECKBOX_SOURCE_IDS = 'c_amsids';
41
42 private const F_SOURCE_TYPE = 'f_st';
43 private const F_SOURCE_ID = 'f_sid';
44 private const F_ORIGINAL_SOURCE_TYPE = 'f_st_org';
45 private const F_ORIGINAL_SOURCE_ID = 'f_sid_org';
46
47 private const CMD_VIEW = 'view';
48 private const CMD_SAVE = 'save';
49 private const CMD_DELETE = 'delete';
50 private const CMD_DELETE_CONFIRMATION = 'deleteConfirmation';
51 private const CMD_GET_ASYNC_MODAL_OUTPUT = 'getAsynchModalOutput';
52 private const CMD_NEXT_STEP = 'nextStep';
53 private const CMD_ENABLE = 'enable';
54 private const CMD_DISABLE = 'disable';
55 private const CMD_PROFILE_NOT_PUBLIC = 'profile_not_public';
56
57 private static array $switch_to_ref_id = [
60 ];
61
63 public ilCtrl $ctrl;
66 public ?int $prg_ref_id;
72 protected Psr\Http\Message\ServerRequestInterface $request;
73 protected ilTree $tree;
77
78 public function __construct(
80 ilCtrl $ilCtrl,
81 ilToolbarGUI $ilToolbar,
87 Psr\Http\Message\ServerRequestInterface $request,
89 ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper,
90 ILIAS\Refinery\Factory $refinery
91 ) {
92 $this->tpl = $tpl;
93 $this->ctrl = $ilCtrl;
94 $this->toolbar = $ilToolbar;
95 $this->lng = $lng;
96 $this->ui_factory = $ui_factory;
97 $this->message_box_factory = $message_box_factory;
98 $this->button_factory = $button_factory;
99 $this->ui_renderer = $ui_renderer;
100 $this->request = $request;
101 $this->tree = $tree;
102 $this->request_wrapper = $request_wrapper;
103 $this->refinery = $refinery;
104
105 // Add this js manually here because the modal contains a form that is
106 // loaded asynchronously later on, and this JS won't be pulled then for
107 // some reason.
108 $tpl->addJavaScript("Services/Form/js/Form.js");
109 }
110 public function executeCommand(): void
111 {
112 $cmd = $this->ctrl->getCmd();
113 switch ($cmd) {
114 case self::CMD_VIEW:
115 case self::CMD_DELETE:
120 case self::CMD_SAVE:
121 $this->$cmd();
122 break;
123 case self::CMD_ENABLE:
124 $this->$cmd();
125 $this->ctrl->redirect($this, self::CMD_VIEW);
126 break;
128 $this->view(true);
129 break;
130 default:
131 throw new ilException("ilObjStudyProgrammeAutoMembershipsGUI: Command not supported: $cmd");
132 }
133 }
134
135 protected function nextStep(): void
136 {
137 $current_src_type = null;
138 if ($this->request_wrapper->has(self::F_ORIGINAL_SOURCE_TYPE)) {
139 $current_src_type = $this->request_wrapper->retrieve(
140 self::F_ORIGINAL_SOURCE_TYPE,
141 $this->refinery->to()->string()
142 );
143 }
144
145 $current_src_id = null;
146 if ($this->request_wrapper->has(self::F_ORIGINAL_SOURCE_ID)) {
147 $current_src_id = $this->request_wrapper->retrieve(
148 self::F_ORIGINAL_SOURCE_ID,
149 $this->refinery->to()->string()
150 );
151 }
152
153 $selected_src_type = $this->request_wrapper->retrieve(self::F_SOURCE_TYPE, $this->refinery->kindlyTo()->string());
154 $selected_src = $this->request_wrapper->retrieve(self::F_SOURCE_ID, $this->refinery->kindlyTo()->string());
155
156 $form = $this->getSelectionForm(
157 $selected_src_type,
158 $selected_src,
159 $current_src_type,
160 $current_src_id
161 );
162 $form_id = "form_" . $form->getId();
163
164 $modal = $this->ui_factory->modal()->roundtrip(
165 $this->txt('modal_member_auto_select_title'),
166 $this->ui_factory->legacy($form->getHtml())
167 );
168
169 $submit = $this->ui_factory->button()->primary($this->txt('add'), "#")->withOnLoadCode(
170 function ($id) use ($form_id) {
171 return "$('#$id').click(function() { $('#$form_id').submit(); return false; });";
172 }
173 );
174
175 $modal = $modal->withActionButtons([$submit]);
176
177 echo $this->ui_renderer->renderAsync($modal);
178 exit;
179 }
180
184 protected function view(bool $profile_not_public = false): void
185 {
186 if ($profile_not_public) {
187 $this->tpl->setOnScreenMessage("info", $this->lng->txt('prg_profile_not_public'));
188 }
189 $collected_modals = [];
190 $modal = $this->getModal();
191 $this->getToolbar($modal->getShowSignal());
192 $collected_modals[] = $modal;
193 $data = [];
194 foreach ($this->getObject()->getAutomaticMembershipSources() as $ams) {
195 $title = $this->getTitleRepresentation($ams);
196 $usr = $this->getUserRepresentation($ams->getLastEditorId());
197 $modal = $this->getModal($ams->getSourceType(), $ams->getSourceId());
198 $collected_modals[] = $modal;
199
200 $src_id = $ams->getSourceType() . '-' . $ams->getSourceId();
201 $actions = $this->getItemAction(
202 $src_id,
203 $modal->getShowSignal(),
204 $ams->isEnabled()
205 );
206
207 $data[] = [
208 $ams,
209 $this->ui_renderer->render($title),
210 $this->ui_renderer->render($usr),
211 $this->ui_renderer->render($actions)
212 ];
213 }
214 $table = new ilStudyProgrammeAutoMembershipsTableGUI($this, "view", "");
215 $table->setData($data);
216 $this->tpl->setContent(
217 $this->ui_renderer->render($collected_modals)
218 . $table->getHTML()
219 );
220 }
221
222 protected function save(): void
223 {
224 $form = $this->getForm();
225 $form->checkInput();
226
227 $post = $this->request->getParsedBody();
228 $form->setValuesByArray($post);
229 $src_type = $post[self::F_SOURCE_TYPE];
230 $src_id = $post[self::F_SOURCE_ID . $src_type];
231
232 if (
233 (is_null($src_type) || $src_type === "") ||
234 (is_null($src_id) || $src_id === 0)
235 ) {
236 $this->tpl->setOnScreenMessage("failure", $this->txt('no_srctype_or_id'), true);
237 $this->ctrl->redirect($this, self::CMD_VIEW);
238 return;
239 }
240
241 if (in_array($src_type, self::$switch_to_ref_id)) {
242 $refs = ilObject::_getAllReferences((int) $src_id);
243 $src_id = (int) array_shift($refs);
244 }
245
246 if (
247 array_key_exists(self::F_ORIGINAL_SOURCE_TYPE, $post) &&
248 array_key_exists(self::F_ORIGINAL_SOURCE_ID, $post)
249 ) {
250 $this->getObject()->deleteAutomaticMembershipSource(
251 (string) $post[self::F_ORIGINAL_SOURCE_TYPE],
252 (int) $post[self::F_ORIGINAL_SOURCE_ID]
253 );
254 }
255
256 $this->getObject()->storeAutomaticMembershipSource($src_type, (int) $src_id);
257 $this->tpl->setOnScreenMessage("success", $this->txt("auto_add_success"), true);
258 $this->ctrl->redirect($this, self::CMD_VIEW);
259 }
260
261 protected function deleteConfirmation(): void
262 {
263 $get = $this->request->getQueryParams();
264 $post = $this->request->getParsedBody();
266
267 $field_ids_in_get = array_key_exists($field, $get);
268 $field_ids_in_post = array_key_exists($field, $post);
269
270 $type_ids = '';
271 $msg = '';
272 if ($field_ids_in_get) {
273 $type_ids = $get[$field];
274 $msg = $this->lng->txt('prg_delete_single_confirmation');
275 } elseif ($field_ids_in_post) {
276 $type_ids = implode(' ', $post[$field]);
277 $msg = $this->lng->txt('prg_delete_confirmation');
278 } else {
279 $this->tpl->setOnScreenMessage("info", $this->lng->txt('prg_delete_nothing_selected'), true);
280 $this->ctrl->redirect($this, self::CMD_VIEW);
281 }
282
283 $type_ids = base64_encode($type_ids);
284
285 $this->ctrl->setParameterByClass(self::class, $field, $type_ids);
286 $delete = $this->ctrl->getFormActionByClass(self::class, self::CMD_DELETE);
287 $cancel = $this->ctrl->getFormActionByClass(self::class, self::CMD_VIEW);
288 $this->ctrl->clearParameterByClass(self::class, $field);
289
290 $buttons = [
291 $this->button_factory->standard($this->lng->txt('prg_confirm_delete'), $delete),
292 $this->button_factory->standard($this->lng->txt('prg_cancel'), $cancel)
293 ];
294
295 $message_box = $this->message_box_factory->confirmation($msg)->withButtons($buttons);
296
297 $this->tpl->setContent($this->ui_renderer->render($message_box));
298 }
299
300 protected function delete(): void
301 {
303 $get = $this->request->getQueryParams();
304
305 if (!array_key_exists($field, $get)) {
306 $this->tpl->setOnScreenMessage("failure", $this->lng->txt('prg_delete_failure'), true);
307 $this->ctrl->redirect($this, self::CMD_VIEW);
308 }
309
310 $type_ids = base64_decode($get[$field]);
311 $type_ids = explode(' ', trim($type_ids));
312
313 foreach ($type_ids as $src_id) {
314 [$type, $id] = explode('-', $src_id);
315 $this->getObject()->deleteAutomaticMembershipSource((string) $type, (int) $id);
316 }
317
318 $msg = $this->lng->txt('prg_delete_single_success');
319 if (count($type_ids) > 1) {
320 $msg = $this->lng->txt('prg_delete_success');
321 }
322
323 $this->tpl->setOnScreenMessage("success", $msg, true);
324 $this->ctrl->redirect($this, self::CMD_VIEW);
325 }
326
330 protected function enable(): void
331 {
332 $get = $this->request->getQueryParams();
334 if (array_key_exists($field, $get)) {
335 [$type, $id] = explode('-', $get[$field]);
336 $this->getObject()->enableAutomaticMembershipSource((string) $type, (int) $id);
337 }
338 $this->ctrl->redirect($this, self::CMD_VIEW);
339 }
340
344 protected function disable(): void
345 {
346 $get = $this->request->getQueryParams();
348 if (array_key_exists($field, $get)) {
349 [$type, $id] = explode('-', $get[$field]);
350 $this->getObject()->disableAutomaticMembershipSource((string) $type, (int) $id);
351 }
352 $this->ctrl->redirect($this, self::CMD_VIEW);
353 }
354
358 public function setRefId(int $prg_ref_id): void
359 {
360 $this->prg_ref_id = $prg_ref_id;
361 }
362
366 public function setParentGUI(ilContainerGUI $a_parent_gui): void
367 {
368 $this->parent_gui = $a_parent_gui;
369 }
370
374 protected function getObject(): ilObjStudyProgramme
375 {
376 if ($this->object === null ||
377 $this->object->getRefId() !== $this->prg_ref_id
378 ) {
379 $this->object = ilObjStudyProgramme::getInstanceByRefId($this->prg_ref_id);
380 }
381 return $this->object;
382 }
383
384 protected function getModal(string $source_type = null, int $source_id = null): RoundTrip
385 {
386 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, $source_type);
387 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, $source_id);
388 $link = $this->ctrl->getLinkTarget($this, "getAsynchModalOutput", "", true);
389 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, null);
390 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, null);
391
392 return $this->ui_factory->modal()->roundtrip(
393 '',
394 []
395 )
396 ->withAsyncRenderUrl($link);
397 }
398
399 protected function getAsynchModalOutput(): void
400 {
401 $current_src_type = null;
402 if ($this->request_wrapper->has(self::F_ORIGINAL_SOURCE_TYPE)) {
403 $current_src_type = $this->request_wrapper->retrieve(
404 self::F_ORIGINAL_SOURCE_TYPE,
405 $this->refinery->to()->string()
406 );
407 }
408
409 $current_src_id = null;
410 if ($this->request_wrapper->has(self::F_ORIGINAL_SOURCE_ID)) {
411 $current_src_id = $this->request_wrapper->retrieve(self::F_ORIGINAL_SOURCE_ID, $this->refinery->to()->string());
412 }
413
414 $form = $this->getForm($current_src_type, $current_src_id);
415 $form_id = "form_" . $form->getId();
416
417 $modal = $this->ui_factory->modal()->roundtrip(
418 $this->txt('modal_member_auto_select_title'),
419 $this->ui_factory->legacy($form->getHtml())
420 );
421
422 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, $current_src_type);
423 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, $current_src_id);
424 $link = $this->ctrl->getLinkTarget($this, "nextStep", "", true);
425 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, null);
426 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, null);
427
428 $replaceSignal = $modal->getReplaceSignal();
429 $signal_id = $replaceSignal->getId();
430 $f_selected_type = self::F_SOURCE_TYPE;
431 $f_selected_id = self::F_SOURCE_ID;
432 $submit = $this->ui_factory->button()->primary($this->txt('search'), "#")
433 ->withOnLoadCode(
434 function ($id) use ($form_id, $link, $signal_id, $f_selected_type, $f_selected_id) {
435 return
436 "$('#$id').click(function() {
437
438 var checked = $(\"input[name='$f_selected_type']:checked\"). val();
439 if(checked == 'orgu' || typeof(checked) == \"undefined\") {
440 console.log('$(\'#$form_id\').submit()');
441 document.getElementById('$form_id').submit();
442 return false;
443 }
444
445 var i_value = $(\"input[name='$f_selected_id\" + checked + \"']\"). val();
446 if(i_value == '' || typeof(i_value) == \"undefined\") {
447 document.getElementById('$form_id').submit();
448 return false;
449 }
450
451 n_url = '$link' + '&$f_selected_type=' + checked + '&$f_selected_id=' + i_value;
452 $('#$id').attr(\"onclick\", function(event) {
453 $(this).trigger('$signal_id',
454 {
455 'id' : '$signal_id', 'event' : 'click',
456 'triggerer' : $(this),
457 'options' : JSON.parse('{\"url\":\"' + n_url + '\"}')
458 }
459 );
460 });
461 return false;
462 }
463 );";
464 }
465 );
466
467 $modal = $modal->withActionButtons([$submit])
468 ->withAdditionalOnLoadCode(
469 function ($id) use ($form) {
470 $selector_post_var = self::F_SOURCE_ID . ilStudyProgrammeAutoMembershipSource::TYPE_ORGU;
471 $js = $form->getItemByPostVar($selector_post_var)->getOnloadCode();
472 return implode(';', $js);
473 }
474 );
475
476 echo $this->ui_renderer->renderAsync($modal);
477 exit;
478 }
479
480 protected function getForm(string $source_type = null, ?string $source_id = ''): ilPropertyFormGUI
481 {
482 $form = new ilPropertyFormGUI();
483
484 if (is_null($source_type)) {
485 $source_type = "";
486 }
487
488 $form->setId(uniqid($source_type . $source_id, true));
489 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
490
491 $rgroup = new ilRadioGroupInputGUI($this->txt('membership_source_type'), self::F_SOURCE_TYPE);
492 $rgroup->setValue($source_type);
493 $form->addItem($rgroup);
494
495 $radio_role = new ilRadioOption(
498 );
499
500 $ni_role = new ilTextInputGUI(
503 );
504 $radio_role->addSubItem($ni_role);
505 $rgroup->addOption($radio_role);
506
507 $radio_grp = new ilRadioOption(
510 );
511 $ni_grp = new ilTextInputGUI(
514 );
515 $radio_grp->addSubItem($ni_grp);
516 $rgroup->addOption($radio_grp);
517
518 $radio_crs = new ilRadioOption(
521 );
522 $ni_crs = new ilTextInputGUI(
525 );
526 $radio_crs->addSubItem($ni_crs);
527 $rgroup->addOption($radio_crs);
528
529 $radio_orgu = new ilRadioOption(
532 );
534 "",
536 false,
537 $this
538 );
539 $orgu->getExplorerGUI()->setSelectableTypes(["orgu"]);
540 $orgu->getExplorerGUI()->setTypeWhiteList(["root", "orgu"]);
541 $orgu->getExplorerGUI()->setRootId(ilObjOrgUnit::getRootOrgRefId());
542 $orgu->getExplorerGUI()->setAjax(false);
543 $radio_orgu->addSubItem($orgu);
544 $rgroup->addOption($radio_orgu);
545 if (
546 !is_null($source_type) &&
547 !is_null($source_id) &&
548 $source_type !== "" &&
549 $source_id !== ""
550 ) {
551 switch ($source_type) {
553 $ni_role->setValue($source_id);
554 break;
556 $ni_grp->setValue($source_id);
557 break;
559 $ni_crs->setValue($source_id);
560 break;
562 $orgu->setValue($source_id);
563 break;
564 default:
565 }
566 }
567
568 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_TYPE);
569 $hi->setValue($source_type);
570 $form->addItem($hi);
571
572 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_ID);
573 $hi->setValue($source_id ?? '');
574 $form->addItem($hi);
575
576 return $form;
577 }
578
579 protected function getSelectionForm(
580 string $selected_source_type,
581 string $selected_source,
582 string $source_type = null,
583 string $source_id = null
585 $form = new ilPropertyFormGUI();
586 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
587
588 $query_parser = $this->parseQueryString($selected_source);
589 $object_search = new ilLikeObjectSearch($query_parser);
590 $object_search->setFilter(array($selected_source_type));
591 $entries = $object_search->performSearch()->getEntries();
592
593 $rgoup = new ilRadioGroupInputGUI(
594 $this->txt("prg_auto_member_select_" . $selected_source_type),
595 self::F_SOURCE_ID . $selected_source_type
596 );
597 $form->addItem($rgoup);
598 foreach ($entries as $entry) {
599 $obj_id = (int) $entry['obj_id'];
600 $title = ilObject::_lookupTitle($obj_id);
601 $description = ilObject::_lookupDescription($obj_id);
602
603 $option = new ilRadioOption($title, (string) $obj_id, $description);
604 $rgoup->addOption($option);
605 }
606
607 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_TYPE);
608 $hi->setValue($source_type ?? '');
609 $form->addItem($hi);
610
611 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_ID);
612 $hi->setValue((string) $source_id);
613 $form->addItem($hi);
614
615 $hi = new ilHiddenInputGUI(self::F_SOURCE_TYPE);
616 $hi->setValue($selected_source_type);
617 $form->addItem($hi);
618
619 return $form;
620 }
621
625 protected function parseQueryString(string $string)
626 {
627 $query_parser = new ilQueryParser(ilUtil::stripSlashes($string));
628 $query_parser->setCombination(ilQueryParser::QP_COMBINATION_AND);
629 $query_parser->setMinWordLength(1);
630 $query_parser->setGlobalMinLength(3); // #14768
631 $query_parser->parse();
632
633 if (!$query_parser->validate()) {
634 return $query_parser->getMessage();
635 }
636 return $query_parser;
637 }
638
642 protected function getToolbar(Signal $add_cat_signal): void
643 {
644 $btn = $this->ui_factory->button()->primary($this->txt('add_automembership_source'), '')
645 ->withOnClick($add_cat_signal);
646 $this->toolbar->addComponent($btn);
647 }
648
649
650
651 protected function getItemAction(
652 string $src_id,
653 Signal $signal,
654 bool $is_enabled
655 ): Dropdown\Standard {
656 $items = [];
657
658 $items[] = $this->ui_factory->button()->shy($this->txt('edit'), '')
659 ->withOnClick($signal);
660
661 $this->ctrl->setParameter($this, self::CHECKBOX_SOURCE_IDS, $src_id);
662
663 if ($is_enabled) {
664 $items[] = $this->ui_factory->button()->shy(
665 $this->txt('deactivate'),
666 $this->ctrl->getLinkTarget($this, self::CMD_DISABLE)
667 );
668 } else {
669 $items[] = $this->ui_factory->button()->shy(
670 $this->txt('activate'),
671 $this->ctrl->getLinkTarget($this, self::CMD_ENABLE)
672 );
673 }
674
675 $items[] = $this->ui_factory->button()->shy(
676 $this->txt('delete'),
677 $this->ctrl->getLinkTarget($this, self::CMD_DELETE_CONFIRMATION)
678 );
679
680 $this->ctrl->clearParameters($this);
681
682 return $this->ui_factory->dropdown()->standard($items);
683 }
684
685 protected function getUserRepresentation(int $usr_id): Link\Standard
686 {
687 $username = ilObjUser::_lookupName($usr_id);
688 $editor = implode(' ', [
689 $username['firstname'],
690 $username['lastname'],
691 '(' . $username['login'] . ')'
692 ]);
694 $url = ilLink::_getStaticLink($usr_id, 'usr');
695
696 if (!$usr->hasPublicProfile()) {
697 $url = $this->ctrl->getLinkTarget($this, self::CMD_PROFILE_NOT_PUBLIC);
698 }
699 return $this->ui_factory->link()->standard($editor, $url);
700 }
701
702
703 protected function getTitleRepresentation(
705 ): Link\Standard {
706 $src_id = $ams->getSourceId();
707
708 switch ($ams->getSourceType()) {
710 $title = ilObjRole::_lookupTitle($src_id) ?? "-";
711 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'obj_id', $src_id);
712 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'ref_id', self::ROLEFOLDER_REF_ID);
713 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'admin_mode', 'settings');
714 $url = $this->ctrl->getLinkTargetByClass(['ilAdministrationGUI', 'ilObjRoleGUI'], 'userassignment');
715 $this->ctrl->clearParametersByClass('ilObjRoleGUI');
716 break;
717
719 $url = ilLink::_getStaticLink($src_id, 'crs');
720 // no break
722 $url = ilLink::_getStaticLink($src_id, 'grp');
723 $hops = array_map(
724 static function (array $c): string {
725 return ilObject::_lookupTitle((int) $c["obj_id"]);
726 },
727 $this->tree->getPathFull($src_id)
728 );
729 $hops = array_slice($hops, 1);
730 $title = implode(' > ', $hops) ?? "-";
731 break;
732
734 $hops = array_map(
735 static function (array $c): string {
736 return ilObject::_lookupTitle((int)$c["obj_id"]);
737 },
738 $this->tree->getPathFull($src_id)
739 );
740 $hops = array_slice($hops, 3);
741 $title = implode(' > ', $hops) ?? "-";
742 $url = ilLink::_getStaticLink($src_id, $ams->getSourceType());
743 break;
744 default:
745 throw new LogicException("This should not happen. Forgot a case in the switch?");
746 }
747
748 return $this->ui_factory->link()->standard($title, $url);
749 }
750
751 protected function txt(string $code): string
752 {
753 return $this->lng->txt($code);
754 }
755}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
Builds a Color from either hex- or rgb values.
Definition: Factory.php:17
Builds data types.
Definition: Factory.php:21
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
Class ilCtrl provides processing control methods.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setFormAction(string $a_formaction)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
language handling
static getRootOrgRefId()
getForm(string $source_type=null, ?string $source_id='')
getModal(string $source_type=null, int $source_id=null)
getTitleRepresentation(ilStudyProgrammeAutoMembershipSource $ams)
getItemAction(string $src_id, Signal $signal, bool $is_enabled)
getSelectionForm(string $selected_source_type, string $selected_source, string $source_type=null, string $source_id=null)
setRefId(int $prg_ref_id)
Set ref-id of StudyProgramme before using this GUI.
__construct(ilGlobalTemplateInterface $tpl, ilCtrl $ilCtrl, ilToolbarGUI $ilToolbar, ilLanguage $lng, Factory $ui_factory, MessageBox\Factory $message_box_factory, Button\Factory $button_factory, Renderer $ui_renderer, Psr\Http\Message\ServerRequestInterface $request, ilTree $tree, ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper, ILIAS\Refinery\Factory $refinery)
setParentGUI(ilContainerGUI $a_parent_gui)
Set this GUI's parent gui.
static _lookupName(int $a_user_id)
lookup user name
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
static _getAllReferences(int $id)
get all reference ids for object ID
static _lookupTitle(int $obj_id)
static _lookupDescription(int $obj_id)
This class represents a property form user interface.
This class represents a property in a property form.
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...
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...
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...
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="")
$c
Definition: cli.php:38
Interface RequestWrapper.
This describes a standard button.
Definition: Standard.php:27
withOnClick(Signal $signal)
Get a component like this, triggering a signal of another component on click.
This describes commonalities between all types of Dropdowns.
Definition: Dropdown.php:35
This is how a factory for Message Boxes looks like.
Definition: Factory.php:27
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...
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
exit
Definition: login.php:28
$post
Definition: ltitoken.php:49
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Bulky.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Dropdown.php:21
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: Factory.php:21
Class ChatMainBarProvider \MainMenu\Provider.
$type
$url