ILIAS  release_7 Revision v7.30-3-g800a261c036
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(
94 ilCtrl $ilCtrl,
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('add'), "#")->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 ilUtil::sendSuccess($this->txt("auto_add_success"), true);
271 $this->ctrl->redirect($this, self::CMD_VIEW);
272 }
273
274 protected function deleteConfirmation()
275 {
276 $get = $this->request->getQueryParams();
277 $post = $this->request->getParsedBody();
279
280 $field_ids_in_get = array_key_exists($field, $get);
281 $field_ids_in_post = array_key_exists($field, $post);
282
283 if ($field_ids_in_get) {
284 $type_ids = $get[$field];
285 $msg = $this->lng->txt('prg_delete_single_confirmation');
286 } elseif ($field_ids_in_post) {
287 $type_ids = implode(' ', $post[$field]);
288 $msg = $this->lng->txt('prg_delete_confirmation');
289 } else {
290 ilUtil::sendInfo($this->lng->txt('prg_delete_nothing_selected'), true);
291 $this->ctrl->redirect($this, self::CMD_VIEW);
292 }
293
294 $type_ids = base64_encode($type_ids);
295
296 $this->ctrl->setParameterByClass(self::class, $field, $type_ids);
297 $delete = $this->ctrl->getFormActionByClass(self::class, self::CMD_DELETE);
298 $cancel = $this->ctrl->getFormActionByClass(self::class, self::CMD_VIEW);
299 $this->ctrl->clearParameterByClass(self::class, $field);
300
301 $buttons = [
302 $this->button_factory->standard($this->lng->txt('prg_confirm_delete'), $delete),
303 $this->button_factory->standard($this->lng->txt('prg_cancel'), $cancel)
304 ];
305
306 $message_box = $this->message_box_factory->confirmation($msg)->withButtons($buttons);
307
308 $this->tpl->setContent($this->ui_renderer->render($message_box));
309 }
310
311 protected function delete()
312 {
314 $get = $this->request->getQueryParams();
315
316 if (!array_key_exists($field, $get)) {
317 ilUtil::sendFailure($this->lng->txt('prg_delete_failure'), true);
318 $this->ctrl->redirect($this, self::CMD_VIEW);
319 }
320
321 $type_ids = base64_decode($get[$field]);
322 $type_ids = explode(' ', trim($type_ids));
323
324 foreach ($type_ids as $src_id) {
325 [$type, $id] = explode('-', $src_id);
326 $this->getObject()->deleteAutomaticMembershipSource((string) $type, (int) $id);
327 }
328
329 $msg = $this->lng->txt('prg_delete_single_success');
330 if (count($type_ids) > 1) {
331 $msg = $this->lng->txt('prg_delete_success');
332 }
333
334 ilUtil::sendSuccess($msg, true);
335 $this->ctrl->redirect($this, self::CMD_VIEW);
336 }
337
341 protected function enable()
342 {
343 $get = $this->request->getQueryParams();
345 if (array_key_exists($field, $get)) {
346 [$type, $id] = explode('-', $get[$field]);
347 $this->getObject()->enableAutomaticMembershipSource((string) $type, (int) $id);
348 }
349 $this->ctrl->redirect($this, self::CMD_VIEW);
350 }
351
355 protected function disable()
356 {
357 $get = $this->request->getQueryParams();
359 if (array_key_exists($field, $get)) {
360 [$type, $id] = explode('-', $get[$field]);
361 $this->getObject()->disableAutomaticMembershipSource((string) $type, (int) $id);
362 }
363 $this->ctrl->redirect($this, self::CMD_VIEW);
364 }
365
370 public function setRefId(int $prg_ref_id)
371 {
372 $this->prg_ref_id = $prg_ref_id;
373 }
378 public function setParentGUI(ilContainerGUI $a_parent_gui)
379 {
380 $this->parent_gui = $a_parent_gui;
381 }
382
387 protected function getObject()
388 {
389 if ($this->object === null ||
390 (int) $this->object->getRefId() !== $this->prg_ref_id
391 ) {
392 $this->object = ilObjStudyProgramme::getInstanceByRefId($this->prg_ref_id);
393 }
394 return $this->object;
395 }
396
397 protected function getModal(
398 string $source_type = null,
399 int $source_id = null
400 ) {
401 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, $source_type);
402 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, $source_id);
403 $link = $this->ctrl->getLinkTarget($this, "getAsynchModalOutput", "", true);
404 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, null);
405 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, null);
406
407 $modal = $this->ui_factory->modal()->roundtrip(
408 '',
409 []
410 )->withAsyncRenderUrl(
411 $link
412 );
413
414 return $modal;
415 }
416
417 protected function getAsynchModalOutput()
418 {
419 $current_src_type = null;
420 if (
421 array_key_exists(self::F_ORIGINAL_SOURCE_TYPE, $_GET) &&
422 !is_null($_GET[self::F_ORIGINAL_SOURCE_TYPE])
423 ) {
424 $current_src_type = $_GET[self::F_ORIGINAL_SOURCE_TYPE];
425 }
426 $current_src_id = null;
427 if (
428 array_key_exists(self::F_ORIGINAL_SOURCE_ID, $_GET) &&
429 !is_null($_GET[self::F_ORIGINAL_SOURCE_ID])
430 ) {
431 $current_src_id = (int) $_GET[self::F_ORIGINAL_SOURCE_ID];
432 }
433 $form = $this->getForm($current_src_type, $current_src_id);
434 $form_id = "form_" . $form->getId();
435
436 $modal = $this->ui_factory->modal()->roundtrip(
437 $this->txt('modal_member_auto_select_title'),
438 $this->ui_factory->legacy($form->getHtml())
439 );
440
441 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, $current_src_type);
442 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, $current_src_id);
443 $link = $this->ctrl->getLinkTarget($this, "nextStep", "", true);
444 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_TYPE, null);
445 $this->ctrl->setParameter($this, self::F_ORIGINAL_SOURCE_ID, null);
446
447 $replaceSignal = $modal->getReplaceSignal();
448 $signal_id = $replaceSignal->getId();
449 $f_selected_type = self::F_SOURCE_TYPE;
450 $f_selected_id = self::F_SOURCE_ID;
451 $submit = $this->ui_factory->button()->primary($this->txt('search'), "#")->withOnLoadCode(
452 function ($id) use ($form_id, $link, $signal_id, $f_selected_type, $f_selected_id) {
453 return
454 "$('#{$id}').click(function() {
455 var checked = $(\"input[name='{$f_selected_type}']:checked\"). val();
456 if(checked == 'orgu' || typeof(checked) == \"undefined\") {
457 $('#{$form_id}').submit();
458 return false;
459 }
460
461 var i_value = $(\"input[name='{$f_selected_id}\" + checked + \"']\"). val();
462 if(i_value == '' || typeof(i_value) == \"undefined\") {
463 $('#{$form_id}').submit();
464 return false;
465 }
466
467 n_url = '{$link}' + '&{$f_selected_type}=' + checked + '&{$f_selected_id}=' + i_value;
468 $('#{$id}').attr(\"onclick\", function(event) {
469 $(this).trigger('{$signal_id}',
470 {
471 'id' : '{$signal_id}', 'event' : 'click',
472 'triggerer' : $(this),
473 'options' : JSON.parse('{\"url\":\"' + n_url + '\"}')
474 }
475 );
476 });
477 return false;
478 }
479 );"
480 ;
481 }
482 );
483
484 $modal = $modal->withActionButtons([$submit]);
485
486 echo $this->ui_renderer->renderAsync($modal);
487 exit;
488 }
489
490 protected function getForm(
491 string $source_type = null,
492 int $source_id = null
494 $form = new ilPropertyFormGUI();
495
496 if (is_null($source_type)) {
497 $source_type = "";
498 }
499 if (is_null($source_id)) {
500 $source_id = "";
501 }
502 $form->setId(uniqid((string) $source_type . (string) $source_id));
503 $form->setFormAction($this->ctrl->getFormAction($this, 'save'));
504
505 $rgroup = new ilRadioGroupInputGUI($this->txt('membership_source_type'), self::F_SOURCE_TYPE);
506 $rgroup->setValue($source_type);
507 $form->addItem($rgroup);
508
509 $radio_role = new ilRadioOption(
512 );
513
514 $ni_role = new ilTextInputGUI(
517 );
518 $radio_role->addSubItem($ni_role);
519 $rgroup->addOption($radio_role);
520
521 $radio_grp = new ilRadioOption(
524 );
525 $ni_grp = new ilTextInputGUI(
528 );
529 $radio_grp->addSubItem($ni_grp);
530 $rgroup->addOption($radio_grp);
531
532 $radio_crs = new ilRadioOption(
535 );
536 $ni_crs = new ilTextInputGUI(
539 );
540 $radio_crs->addSubItem($ni_crs);
541 $rgroup->addOption($radio_crs);
542
543 $radio_orgu = new ilRadioOption(
546 );
548 "",
550 false
551 );
552 $orgu->getExplorerGUI()->setSelectableTypes(["orgu"]);
553 $orgu->getExplorerGUI()->setTypeWhiteList(["root", "orgu"]);
554
555 $orgu->getExplorerGUI()->setRootId(ilObjOrgUnit::getRootOrgRefId());
556 $orgu->getExplorerGUI()->setAjax(false);
557 $radio_orgu->addSubItem($orgu);
558 $rgroup->addOption($radio_orgu);
559
560 if (
561 !is_null($source_type) &&
562 !is_null($source_id) &&
563 $source_type !== "" &&
564 $source_id !== ""
565 ) {
566 switch ($source_type) {
568 $ni_role->setValue($source_id);
569 break;
571 $ni_grp->setValue($source_id);
572 break;
574 $ni_crs->setValue($source_id);
575 break;
577 $orgu->setValue($source_id);
578 break;
579 default:
580 }
581 }
582
583 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_TYPE);
584 $hi->setValue($source_type);
585 $form->addItem($hi);
586
587 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_ID);
588 $hi->setValue($source_id);
589 $form->addItem($hi);
590
591 return $form;
592 }
593
594 protected function getSelectionForm(
595 string $selected_source_type,
596 string $selected_source,
597 string $source_type = null,
598 int $source_id = null
600 $form = new ilPropertyFormGUI();
601 $form->setFormAction($this->ctrl->getFormAction($this, "save"));
602
603 $query_parser = $this->parseQueryString($selected_source);
604 include_once 'Services/Search/classes/Like/class.ilLikeObjectSearch.php';
605 $object_search = new ilLikeObjectSearch($query_parser);
606 $object_search->setFilter(array($selected_source_type));
607 $entries = $object_search->performSearch()->getEntries();
608
609 $rgoup = new ilRadioGroupInputGUI(
610 $this->txt("prg_auto_member_select_" . $selected_source_type),
611 self::F_SOURCE_ID . $selected_source_type
612 );
613 $form->addItem($rgoup);
614 foreach ($entries as $entry) {
615 $obj_id = $entry['obj_id'];
616 $title = ilObject::_lookupTitle($obj_id);
617 $description = ilObject::_lookupDescription($obj_id);
618
619 $option = new ilRadioOption($title, $obj_id, $description);
620 $rgoup->addOption($option);
621 }
622
623 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_TYPE);
624 $hi->setValue($source_type);
625 $form->addItem($hi);
626
627 $hi = new ilHiddenInputGUI(self::F_ORIGINAL_SOURCE_ID);
628 $hi->setValue($source_id);
629 $form->addItem($hi);
630
631 $hi = new ilHiddenInputGUI(self::F_SOURCE_TYPE);
632 $hi->setValue($selected_source_type);
633 $form->addItem($hi);
634
635 return $form;
636 }
637
638 protected function parseQueryString($a_string, $a_combination_or = true, $a_ignore_length = false)
639 {
640 $query_parser = new ilQueryParser(ilUtil::stripSlashes($a_string));
641 $query_parser->setCombination(QP_COMBINATION_AND);
642 $query_parser->setMinWordLength(1);
643
644 // #17502
645 if (!(bool) $a_ignore_length) {
646 $query_parser->setGlobalMinLength(3); // #14768
647 }
648
649 $query_parser->parse();
650
651 if (!$query_parser->validate()) {
652 return $query_parser->getMessage();
653 }
654 return $query_parser;
655 }
656
657 public function __storeEntries(&$new_res)
658 {
659 if ($this->stored == false) {
660 $this->result_obj->mergeEntries($new_res);
661 $this->stored = true;
662 return true;
663 } else {
664 $this->result_obj->intersectEntries($new_res);
665 return true;
666 }
667 }
668
672 protected function getToolbar(\ILIAS\UI\Component\Signal $add_cat_signal)
673 {
674 $btn = $this->ui_factory->button()->primary($this->txt('add_automembership_source'), '')
675 ->withOnClick($add_cat_signal);
676 $this->toolbar->addComponent($btn);
677 }
678
679
680
681 protected function getItemAction(
682 string $src_id,
683 \ILIAS\UI\Component\Signal $signal,
684 bool $is_enabled
685 ) : \ILIAS\UI\Component\Dropdown\Standard {
686 $items = [];
687
688 $items[] = $this->ui_factory->button()->shy($this->txt('edit'), '')
689 ->withOnClick($signal);
690
691 $this->ctrl->setParameter($this, self::CHECKBOX_SOURCE_IDS, $src_id);
692
693 if ($is_enabled) {
694 $items[] = $this->ui_factory->button()->shy(
695 $this->txt('deactivate'),
696 $this->ctrl->getLinkTarget($this, self::CMD_DISABLE)
697 );
698 } else {
699 $items[] = $this->ui_factory->button()->shy(
700 $this->txt('activate'),
701 $this->ctrl->getLinkTarget($this, self::CMD_ENABLE)
702 );
703 }
704
705 $items[] = $this->ui_factory->button()->shy(
706 $this->txt('delete'),
707 $this->ctrl->getLinkTarget($this, self::CMD_DELETE_CONFIRMATION)
708 );
709
710 $this->ctrl->clearParameters($this);
711
712 $dd = $this->ui_factory->dropdown()->standard($items);
713 return $dd;
714 }
715
716 protected function getUserRepresentation(int $usr_id) : \ILIAS\UI\Component\Link\Standard
717 {
718 $username = ilObjUser::_lookupName($usr_id);
719 $editor = implode(' ', [
720 $username['firstname'],
721 $username['lastname'],
722 '(' . $username['login'] . ')'
723 ]);
725 $url = ilLink::_getStaticLink($usr_id, 'usr');
726
727 if (!$usr->hasPublicProfile()) {
728 $url = $this->ctrl->getLinkTarget($this, self::CMD_PROFILE_NOT_PUBLIC);
729 }
730 return $this->ui_factory->link()->standard($editor, $url);
731 }
732
733
734 protected function getTitleRepresentation(
736 ) : \ILIAS\UI\Component\Link\Standard {
737 $src_id = $ams->getSourceId();
738
739 $title = "";
740 $url = "";
741 switch ($ams->getSourceType()) {
743 $title = ilObjRole::_lookupTitle($src_id) ?? "-";
744 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'obj_id', $src_id);
745 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'ref_id', self::ROLEFOLDER_REF_ID);
746 $this->ctrl->setParameterByClass('ilObjRoleGUI', 'admin_mode', 'settings');
747 $url = $this->ctrl->getLinkTargetByClass(['ilAdministrationGUI', 'ilObjRoleGUI'], 'userassignment');
748 $this->ctrl->clearParametersByClass('ilObjRoleGUI');
749 break;
750
752 $url = ilLink::_getStaticLink($src_id, 'crs');
753 // no break
755 $url = ilLink::_getStaticLink($src_id, 'grp');
756 $hops = array_map(
757 function ($c) {
758 return ilObject::_lookupTitle($c["obj_id"]);
759 },
760 $this->tree->getPathFull($src_id)
761 );
762 $hops = array_slice($hops, 1);
763 $title = implode(' > ', $hops) ?? "-";
764 break;
765
767 $hops = array_map(
768 function ($c) {
769 return ilObject::_lookupTitle($c["obj_id"]);
770 },
771 $this->tree->getPathFull($src_id)
772 );
773 $hops = array_slice($hops, 3);
774 $title = implode(' > ', $hops) ?? "-";
775 $url = ilLink::_getStaticLink($src_id, $ams->getSourceType());
776 break;
777 default:
778 throw new \LogicException("This should not happen. Forgot a case in the switch?");
779 }
780
781 return $this->ui_factory->link()->standard($title, $url);
782 }
783
784 protected function txt(string $code) : string
785 {
786 return $this->lng->txt($code);
787 }
788}
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
Builds a Color from either hex- or rgb values.
Definition: Factory.php:14
const QP_COMBINATION_AND
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilContainerGUI.
This class provides processing control methods.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
$c
Definition: cli.php:37
withOnClick(Signal $signal)
@inheritdocs
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