ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilObjStudyProgrammeAutoMembershipsGUI.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types = 1);
4
5use GuzzleHttp\Psr7\ServerRequest;
10
19{
21 const CHECKBOX_SOURCE_IDS = 'c_amsids';
22
23 const F_SOURCE_TYPE = 'f_st';
24 const F_SOURCE_ID = 'f_sid';
25 const F_ORIGINAL_SOURCE_TYPE = 'f_st_org';
26 const F_ORIGINAL_SOURCE_ID = 'f_sid_org';
27
28 const CMD_VIEW = 'view';
29 const CMD_SAVE = 'save';
30 const CMD_DELETE = 'delete';
31 const CMD_DELETE_CONFIRMATION = 'deleteConfirmation';
32 const CMD_GET_ASYNC_MODAL_OUTPUT = 'getAsynchModalOutput';
33 const CMD_NEXT_STEP = 'nextStep';
34 const CMD_ENABLE = 'enable';
35 const CMD_DISABLE = 'disable';
36 const CMD_PROFILE_NOT_PUBLIC = 'profile_not_public';
37
38 private static $switch_to_ref_id = [
41 ];
42
46 public $tpl;
50 public $ctrl;
54 public $toolbar;
58 public $lng;
66 public $object;
78 protected $button_factory;
86 protected $request;
90 protected $tree;
91
92 public function __construct(
95 ilToolbarGUI $ilToolbar,
101 ServerRequest $request,
103 ) {
104 $this->tpl = $tpl;
105 $this->ctrl = $ilCtrl;
106 $this->toolbar = $ilToolbar;
107 $this->lng = $lng;
108 $this->ui_factory = $ui_factory;
109 $this->message_box_factory = $message_box_factory;
110 $this->button_factory = $button_factory;
111 $this->ui_renderer = $ui_renderer;
112 $this->request = $request;
113 $this->tree = $tree;
114
115 // Add this js manually here because the modal contains a form that is
116 // loaded asynchronously later on, and this JS won't be pulled then for
117 // some reason.
118 $tpl->addJavaScript("Services/Form/js/Form.js");
119 }
120 public function executeCommand()
121 {
122 $cmd = $this->ctrl->getCmd();
123 switch ($cmd) {
124 case self::CMD_VIEW:
125 case self::CMD_DELETE:
130 case self::CMD_SAVE:
131 $this->$cmd();
132 break;
133 case self::CMD_ENABLE:
134 $this->$cmd();
135 $this->ctrl->redirect($this, self::CMD_VIEW);
136 break;
138 $this->view(true);
139 break;
140 default:
141 throw new ilException(
142 "ilObjStudyProgrammeAutoMembershipsGUI: " .
143 "Command not supported: $cmd"
144 );
145 }
146 }
147
148 protected function nextStep()
149 {
150 $current_src_type = null;
151 if (
152 array_key_exists(self::F_ORIGINAL_SOURCE_TYPE, $_GET) &&
153 !is_null($_GET[self::F_ORIGINAL_SOURCE_TYPE])
154 ) {
155 $current_src_type = $_GET[self::F_ORIGINAL_SOURCE_TYPE];
156 }
157 $current_src_id = null;
158 if (
159 array_key_exists(self::F_ORIGINAL_SOURCE_ID, $_GET) &&
160 !is_null($_GET[self::F_ORIGINAL_SOURCE_ID])
161 ) {
162 $current_src_id = (int) $_GET[self::F_ORIGINAL_SOURCE_ID];
163 }
164
165 $selected_src_type = $_GET[self::F_SOURCE_TYPE];
166 $selected_src = $_GET[self::F_SOURCE_ID];
167
168 $form = $this->getSelectionForm(
169 $selected_src_type,
170 $selected_src,
171 $current_src_type,
172 $current_src_id
173 );
174 $form_id = "form_" . $form->getId();
175
176 $modal = $this->ui_factory->modal()->roundtrip(
177 $this->txt('modal_member_auto_select_title'),
178 $this->ui_factory->legacy($form->getHtml())
179 );
180
181 $submit = $this->ui_factory->button()->primary($this->txt('save'), "#")->withOnLoadCode(
182 function ($id) use ($form_id) {
183 return "$('#{$id}').click(function() { $('#{$form_id}').submit(); return false; });";
184 }
185 );
186
187 $modal = $modal->withActionButtons([$submit]);
188
189 echo $this->ui_renderer->renderAsync($modal);
190 exit;
191 }
192
196 protected function view(bool $profile_not_public = false)
197 {
198 if ($profile_not_public) {
199 ilUtil::sendInfo($this->lng->txt('prg_profile_not_public'));
200 }
201 $collected_modals = [];
202 $modal = $this->getModal();
203 $this->getToolbar($modal->getShowSignal());
204 $collected_modals[] = $modal;
205 $data = [];
206 foreach ($this->getObject()->getAutomaticMembershipSources() as $ams) {
207 $title = $this->getTitleRepresentation($ams);
208 $usr = $this->getUserRepresentation($ams->getLastEditorId());
209 $modal = $this->getModal($ams->getSourceType(), $ams->getSourceId());
210 $collected_modals[] = $modal;
211
212 $src_id = $ams->getSourceType() . '-' . $ams->getSourceId();
213 $actions = $this->getItemAction(
214 $src_id,
215 $modal->getShowSignal(),
216 $ams->isEnabled()
217 );
218
219 $data[] = [
220 $ams,
221 $this->ui_renderer->render($title),
222 $this->ui_renderer->render($usr),
223 $this->ui_renderer->render($actions)
224 ];
225 }
226 $table = new ilStudyProgrammeAutoMembershipsTableGUI($this, "view", "");
227 $table->setData($data);
228 $this->tpl->setContent(
229 $this->ui_renderer->render($collected_modals)
230 . $table->getHTML()
231 );
232 }
233
234 protected function save()
235 {
236 $form = $this->getForm();
237 $form->checkInput();
238 $form->setValuesByPost();
239
240 $post = $this->request->getParsedBody();
241 $src_type = $post[self::F_SOURCE_TYPE];
242 $src_id = $post[self::F_SOURCE_ID . $src_type];
243
244 if (
245 (is_null($src_type) || $src_type == "") ||
246 (is_null($src_id) || $src_id == 0)
247 ) {
248 ilUtil::sendFailure($this->txt('no_srctype_or_id'), true);
249 $this->ctrl->redirect($this, self::CMD_VIEW);
250 return;
251 }
252
253 if (in_array($src_type, self::$switch_to_ref_id)) {
254 $src_id = (int) array_shift(
256 );
257 }
258
259 if (
260 array_key_exists(self::F_ORIGINAL_SOURCE_TYPE, $post) &&
261 array_key_exists(self::F_ORIGINAL_SOURCE_ID, $post)
262 ) {
263 $this->getObject()->deleteAutomaticMembershipSource(
264 (string) $post[self::F_ORIGINAL_SOURCE_TYPE],
265 (int) $post[self::F_ORIGINAL_SOURCE_ID]
266 );
267 }
268
269 $this->getObject()->storeAutomaticMembershipSource($src_type, (int) $src_id);
270 $this->ctrl->redirect($this, self::CMD_VIEW);
271 }
272
273 protected function deleteConfirmation()
274 {
275 $get = $this->request->getQueryParams();
276 $post = $this->request->getParsedBody();
278
279 $field_ids_in_get = array_key_exists($field, $get);
280 $field_ids_in_post = array_key_exists($field, $post);
281
282 if ($field_ids_in_get) {
283 $type_ids = $get[$field];
284 $msg = $this->lng->txt('prg_delete_single_confirmation');
285 } elseif ($field_ids_in_post) {
286 $type_ids = implode(' ', $post[$field]);
287 $msg = $this->lng->txt('prg_delete_confirmation');
288 } else {
289 ilUtil::sendInfo($this->lng->txt('prg_delete_nothing_selected'), true);
290 $this->ctrl->redirect($this, self::CMD_VIEW);
291 }
292
293 $type_ids = base64_encode($type_ids);
294
295 $this->ctrl->setParameterByClass(self::class, $field, $type_ids);
296 $delete = $this->ctrl->getFormActionByClass(self::class, self::CMD_DELETE);
297 $cancel = $this->ctrl->getFormActionByClass(self::class, self::CMD_VIEW);
298 $this->ctrl->clearParameterByClass(self::class, $field);
299
300 $buttons = [
301 $this->button_factory->standard($this->lng->txt('prg_confirm_delete'), $delete),
302 $this->button_factory->standard($this->lng->txt('prg_cancel'), $cancel)
303 ];
304
305 $message_box = $this->message_box_factory->confirmation($msg)->withButtons($buttons);
306
307 $this->tpl->setContent($this->ui_renderer->render($message_box));
308 }
309
310 protected function delete()
311 {
313 $get = $this->request->getQueryParams();
314
315 if (!array_key_exists($field, $get)) {
316 ilUtil::sendFailure($this->lng->txt('prg_delete_failure'), true);
317 $this->ctrl->redirect($this, self::CMD_VIEW);
318 }
319
320 $type_ids = base64_decode($get[$field]);
321 $type_ids = explode(' ', trim($type_ids));
322
323 foreach ($type_ids as $src_id) {
324 [$type, $id] = explode('-', $src_id);
325 $this->getObject()->deleteAutomaticMembershipSource((string) $type, (int) $id);
326 }
327
328 $msg = $this->lng->txt('prg_delete_single_success');
329 if (count($type_ids) > 1) {
330 $msg = $this->lng->txt('prg_delete_success');
331 }
332
333 ilUtil::sendSuccess($msg, true);
334 $this->ctrl->redirect($this, self::CMD_VIEW);
335 }
336
340 protected function enable()
341 {
342 $get = $this->request->getQueryParams();
344 if (array_key_exists($field, $get)) {
345 [$type, $id] = explode('-', $get[$field]);
346 $this->getObject()->enableAutomaticMembershipSource((string) $type, (int) $id);
347 }
348 $this->ctrl->redirect($this, self::CMD_VIEW);
349 }
350
354 protected function disable()
355 {
356 $get = $this->request->getQueryParams();
358 if (array_key_exists($field, $get)) {
359 [$type, $id] = explode('-', $get[$field]);
360 $this->getObject()->disableAutomaticMembershipSource((string) $type, (int) $id);
361 }
362 $this->ctrl->redirect($this, self::CMD_VIEW);
363 }
364
369 public function setRefId(int $prg_ref_id)
370 {
371 $this->prg_ref_id = $prg_ref_id;
372 }
377 public function setParentGUI(ilContainerGUI $a_parent_gui)
378 {
379 $this->parent_gui = $a_parent_gui;
380 }
381
386 protected function getObject()
387 {
388 if ($this->object === null ||
389 (int) $this->object->getRefId() !== $this->prg_ref_id
390 ) {
391 $this->object = ilObjStudyProgramme::getInstanceByRefId($this->prg_ref_id);
392 }
393 return $this->object;
394 }
395
396 protected function getModal(
397 string $source_type = null,
398 int $source_id = null
399 ) {
400 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, $source_type);
401 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, $source_id);
402 $link = $this->ctrl->getLinkTarget($this, "getAsynchModalOutput", "", true);
403 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, null);
404 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, null);
405
406 $modal = $this->ui_factory->modal()->roundtrip(
407 '',
408 []
409 )->withAsyncRenderUrl(
410 $link
411 );
412
413 return $modal;
414 }
415
416 protected function getAsynchModalOutput()
417 {
418 $current_src_type = null;
419 if (
420 array_key_exists(self::F_ORIGINAL_SOURCE_TYPE, $_GET) &&
421 !is_null($_GET[self::F_ORIGINAL_SOURCE_TYPE])
422 ) {
423 $current_src_type = $_GET[self::F_ORIGINAL_SOURCE_TYPE];
424 }
425 $current_src_id = null;
426 if (
427 array_key_exists(self::F_ORIGINAL_SOURCE_ID, $_GET) &&
428 !is_null($_GET[self::F_ORIGINAL_SOURCE_ID])
429 ) {
430 $current_src_id = (int) $_GET[self::F_ORIGINAL_SOURCE_ID];
431 }
432 $form = $this->getForm($current_src_type, $current_src_id);
433 $form_id = "form_" . $form->getId();
434
435 $modal = $this->ui_factory->modal()->roundtrip(
436 $this->txt('modal_member_auto_select_title'),
437 $this->ui_factory->legacy($form->getHtml())
438 );
439
440 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, $current_src_type);
441 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, $current_src_id);
442 $link = $this->ctrl->getLinkTarget($this, "nextStep", "", true);
443 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, null);
444 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, null);
445
446 $replaceSignal = $modal->getReplaceSignal();
447 $signal_id = $replaceSignal->getId();
448 $f_selected_type = self::F_SOURCE_TYPE;
449 $f_selected_id = self::F_SOURCE_ID;
450 $submit = $this->ui_factory->button()->primary($this->txt('search'), "#")->withOnLoadCode(
451 function ($id) use ($form_id, $link, $signal_id, $f_selected_type, $f_selected_id) {
452 return
453 "$('#{$id}').click(function() {
454 var checked = $(\"input[name='{$f_selected_type}']:checked\"). val();
455 if(checked == 'orgu' || typeof(checked) == \"undefined\") {
456 $('#{$form_id}').submit();
457 return false;
458 }
459
460 var i_value = $(\"input[name='{$f_selected_id}\" + checked + \"']\"). val();
461 if(i_value == '' || typeof(i_value) == \"undefined\") {
462 $('#{$form_id}').submit();
463 return false;
464 }
465
466 n_url = '{$link}' + '&{$f_selected_type}=' + checked + '&{$f_selected_id}=' + i_value;
467 $('#{$id}').attr(\"onclick\", function(event) {
468 $(this).trigger('{$signal_id}',
469 {
470 'id' : '{$signal_id}', 'event' : 'click',
471 'triggerer' : $(this),
472 'options' : JSON.parse('{\"url\":\"' + n_url + '\"}')
473 }
474 );
475 });
476 return false;
477 }
478 );"
479 ;
480 }
481 );
482
483 $modal = $modal->withActionButtons([$submit]);
484
485 echo $this->ui_renderer->renderAsync($modal);
486 exit;
487 }
488
489 protected function getForm(
490 string $source_type = null,
491 int $source_id = null
493 $form = new ilPropertyFormGUI();
494
495 if (is_null($source_type)) {
496 $source_type = "";
497 }
498 if (is_null($source_id)) {
499 $source_id = "";
500 }
501 $form->setId(uniqid((string) $source_type . (string) $source_id));
502 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
503
504 $rgroup = new ilRadioGroupInputGUI($this->txt('membership_source_type'), self::F_SOURCE_TYPE);
505 $rgroup->setValue($source_type);
506 $form->addItem($rgroup);
507
508 $radio_role = new ilRadioOption(
511 );
512
513 $ni_role = new ilTextInputGUI(
516 );
517 $radio_role->addSubItem($ni_role);
518 $rgroup->addOption($radio_role);
519
520 $radio_grp = new ilRadioOption(
523 );
524 $ni_grp = new ilTextInputGUI(
527 );
528 $radio_grp->addSubItem($ni_grp);
529 $rgroup->addOption($radio_grp);
530
531 $radio_crs = new ilRadioOption(
534 );
535 $ni_crs = new ilTextInputGUI(
538 );
539 $radio_crs->addSubItem($ni_crs);
540 $rgroup->addOption($radio_crs);
541
542 $radio_orgu = new ilRadioOption(
545 );
547 "",
549 false
550 );
551 $orgu->getExplorerGUI()->setSelectableTypes(["orgu"]);
552 $orgu->getExplorerGUI()->setTypeWhiteList(["root", "orgu"]);
553
554 $orgu->getExplorerGUI()->setRootId(ilObjOrgUnit::getRootOrgRefId());
555 $orgu->getExplorerGUI()->setAjax(false);
556 $radio_orgu->addSubItem($orgu);
557 $rgroup->addOption($radio_orgu);
558
559 if (
560 !is_null($source_type) &&
561 !is_null($source_id) &&
562 $source_type !== "" &&
563 $source_id !== ""
564 ) {
565 switch ($source_type) {
567 $ni_role->setValue($source_id);
568 break;
570 $ni_grp->setValue($source_id);
571 break;
573 $ni_crs->setValue($source_id);
574 break;
576 $orgu->setValue($source_id);
577 break;
578 default:
579 }
580 }
581
582 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_TYPE);
583 $hi->setValue($source_type);
584 $form->addItem($hi);
585
586 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_ID);
587 $hi->setValue($source_id);
588 $form->addItem($hi);
589
590 return $form;
591 }
592
593 protected function getSelectionForm(
594 string $selected_source_type,
595 string $selected_source,
596 string $source_type = null,
597 int $source_id = null
599 $form = new ilPropertyFormGUI();
600 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
601
602 $query_parser = $this->parseQueryString($selected_source);
603 include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
604 $object_search = new ilLikeObjectSearch($query_parser);
605 $object_search->setFilter(array($selected_source_type));
606 $entries = $object_search->performSearch()->getEntries();
607
608 $rgoup = new ilRadioGroupInputGUI(
609 $this->txt("prg_auto_member_select_" . $selected_source_type),
610 self::F_SOURCE_ID . $selected_source_type
611 );
612 $form->addItem($rgoup);
613 foreach ($entries as $entry) {
614 $obj_id = $entry['obj_id'];
615 $title = ilObject::_lookupTitle($obj_id);
616 $description = ilObject::_lookupDescription($obj_id);
617
618 $option = new ilRadioOption($title, $obj_id, $description);
619 $rgoup->addOption($option);
620 }
621
622 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_TYPE);
623 $hi->setValue($source_type);
624 $form->addItem($hi);
625
626 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_ID);
627 $hi->setValue($source_id);
628 $form->addItem($hi);
629
630 $hi = new ilHiddenInputGUI(self::F_SOURCE_TYPE);
631 $hi->setValue($selected_source_type);
632 $form->addItem($hi);
633
634 return $form;
635 }
636
637 protected function parseQueryString($a_string, $a_combination_or = true, $a_ignore_length = false)
638 {
639 $query_parser = new ilQueryParser(ilUtil::stripSlashes($a_string));
640 $query_parser->setCombination(QP_COMBINATION_AND);
641 $query_parser->setMinWordLength(1);
642
643 // #17502
644 if (!(bool) $a_ignore_length) {
645 $query_parser->setGlobalMinLength(3); // #14768
646 }
647
648 $query_parser->parse();
649
650 if (!$query_parser->validate()) {
651 return $query_parser->getMessage();
652 }
653 return $query_parser;
654 }
655
656 public function __storeEntries(&$new_res)
657 {
658 if ($this->stored == false) {
659 $this->result_obj->mergeEntries($new_res);
660 $this->stored = true;
661 return true;
662 } else {
663 $this->result_obj->intersectEntries($new_res);
664 return true;
665 }
666 }
667
671 protected function getToolbar(\ILIAS\UI\Component\Signal $add_cat_signal)
672 {
673 $btn = $this->ui_factory->button()->primary($this->txt('add_automembership_source'), '')
674 ->withOnClick($add_cat_signal);
675 $this->toolbar->addComponent($btn);
676 }
677
678
679
680 protected function getItemAction(
681 string $src_id,
682 \ILIAS\UI\Component\Signal $signal,
683 bool $is_enabled
684 ) : \ILIAS\UI\Component\Dropdown\Standard {
685 $items = [];
686
687 $items[] = $this->ui_factory->button()->shy($this->txt('edit'), '')
688 ->withOnClick($signal);
689
690 $this->ctrl->setParameter($this, self::CHECKBOX_SOURCE_IDS, $src_id);
691
692 if ($is_enabled) {
693 $items[] = $this->ui_factory->button()->shy(
694 $this->txt('disable'),
695 $this->ctrl->getLinkTarget($this, self::CMD_DISABLE)
696 );
697 } else {
698 $items[] = $this->ui_factory->button()->shy(
699 $this->txt('enable'),
700 $this->ctrl->getLinkTarget($this, self::CMD_ENABLE)
701 );
702 }
703
704 $items[] = $this->ui_factory->button()->shy(
705 $this->txt('delete'),
706 $this->ctrl->getLinkTarget($this, self::CMD_DELETE_CONFIRMATION)
707 );
708
709 $this->ctrl->clearParameters($this);
710
711 $dd = $this->ui_factory->dropdown()->standard($items);
712 return $dd;
713 }
714
715 protected function getUserRepresentation(int $usr_id) : \ILIAS\UI\Component\Link\Standard
716 {
717 $username = ilObjUser::_lookupName($usr_id);
718 $editor = implode(' ', [
719 $username['firstname'],
720 $username['lastname'],
721 '(' . $username['login'] . ')'
722 ]);
724 $url = ilLink::_getStaticLink($usr_id, 'usr');
725
726 if (!$usr->hasPublicProfile()) {
727 $url = $this->ctrl->getLinkTarget($this, self::CMD_PROFILE_NOT_PUBLIC);
728 }
729 return $this->ui_factory->link()->standard($editor, $url);
730 }
731
732
733 protected function getTitleRepresentation(
735 ) : \ILIAS\UI\Component\Link\Standard {
736 $src_id = $ams->getSourceId();
737
738 $title = "";
739 $url = "";
740 switch ($ams->getSourceType()) {
742 $title = ilObjRole::_lookupTitle($src_id) ?? "-";
743 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'obj_id', $src_id);
744 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'ref_id', self::ROLEFOLDER_REF_ID);
745 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'admin_mode', 'settings');
746 $url = $this->ctrl->getLinkTargetByClass(['ilAdministrationGUI', 'ilObjRoleGUI'], 'userassignment');
747 $this->ctrl->clearParametersByClass('ilObjRoleGUI');
748 break;
749
752 $hops = array_map(
753 function ($c) {
754 return ilObject::_lookupTitle($c["obj_id"]);
755 },
756 $this->tree->getPathFull($src_id)
757 );
758 $hops = array_slice($hops, 1);
759 $title = implode(' > ', $hops) ?? "-";
760 break;
761
763 $hops = array_map(
764 function ($c) {
765 return ilObject::_lookupTitle($c["obj_id"]);
766 },
767 $this->tree->getPathFull($src_id)
768 );
769 $hops = array_slice($hops, 3);
770 $title = implode(' > ', $hops) ?? "-";
771 $url = ilLink::_getStaticLink($src_id, $ams->getSourceType());
772 break;
773 default:
774 throw new \LogicException("This should not happen. Forgot a case in the switch?");
775 }
776
777 return $this->ui_factory->link()->standard($title, $url);
778 }
779
780 protected function txt(string $code) : string
781 {
782 return $this->lng->txt($code);
783 }
784}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
const QP_COMBINATION_AND
Class ilContainerGUI.
This class provides processing control methods.
Base class for ILIAS Exception handling.
setFormAction($a_formaction)
Set FormAction.
setId($a_id)
Set Id.
This class represents a hidden form property in a property form.
language handling
static getRootOrgRefId()
getToolbar(\ILIAS\UI\Component\Signal $add_cat_signal)
Setup toolbar.
getModal(string $source_type=null, int $source_id=null)
getItemAction(string $src_id, \ILIAS\UI\Component\Signal $signal, bool $is_enabled)
getTitleRepresentation(ilStudyProgrammeAutoMembershipSource $ams)
parseQueryString($a_string, $a_combination_or=true, $a_ignore_length=false)
getForm(string $source_type=null, int $source_id=null)
setRefId(int $prg_ref_id)
Set ref-id of StudyProgramme before using this GUI.
getSelectionForm(string $selected_source_type, string $selected_source, string $source_type=null, int $source_id=null)
setParentGUI(ilContainerGUI $a_parent_gui)
Set this GUI's parent 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, ServerRequest $request, ilTree $tree)
static getInstanceByRefId($a_ref_id)
static _lookupName($a_user_id)
lookup user name
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static _lookupTitle($a_id)
lookup object title
static _lookupDescription($a_id)
lookup object description
static _getAllReferences($a_id)
get all reference ids of object
This class represents a property form user interface.
This class represents a property in a property form.
This class represents an option in a radio group.
This class represents a text property in a property form.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
global $ilCtrl
Definition: ilias.php:18
withOnClick(Signal $signal)
@inheritdocs
This is how a factory for buttons looks like.
Definition: Factory.php:13
This describes a standard button.
Definition: Standard.php:13
A component is the most general form of an entity in the UI.
Definition: Component.php:14
This is how the factory for UI elements looks.
Definition: Factory.php:18
An entity that renders components to a string output.
Definition: Renderer.php:15
exit
Definition: login.php:29
Class ChatMainBarProvider \MainMenu\Provider.
Class Factory.
$type
$url
$data
Definition: storeScorm.php:23