ILIAS  release_8 Revision v8.24
class.ilObjTaxonomyGUI.php
Go to the documentation of this file.
1<?php
2
25{
26 protected ilTabsGUI $tabs;
27 protected ilHelpGUI $help;
28 protected bool $multiple = false;
29 protected bool $assigned_item_sorting = false;
30 protected int $assigned_object_id = 0;
32 protected string $assigned_item_comp_id = "";
33 protected int $assigned_item_obj_id = 0;
34 protected string $assigned_item_type = "";
35 protected string $list_info = '';
36 protected int $current_tax_node = 0;
37 protected int $requested_tax_id = 0;
38 protected string $requested_move_ids = "";
39
43 public function __construct($a_id = 0)
44 {
45 global $DIC;
46
47 $this->ctrl = $DIC->ctrl();
48 $this->lng = $DIC->language();
49 $this->user = $DIC->user();
50 $this->tabs = $DIC->tabs();
51 $this->toolbar = $DIC->toolbar();
52 $this->tpl = $DIC["tpl"];
53 $this->help = $DIC[ilHelp::class];
54 $ilCtrl = $DIC->ctrl();
55 $lng = $DIC->language();
56
58
59 $ilCtrl->saveParameter($this, "tax_node");
60 $ilCtrl->saveParameter($this, "tax_id");
61
63
64 // @todo introduce request wrapper
65 $this->request = $DIC->http()->request();
66 $params = $DIC->http()->request()->getQueryParams();
67 $this->current_tax_node = (int) ($params["tax_node"] ?? null);
68 $this->requested_tax_id = (int) ($params["tax_id"] ?? null);
69 $this->requested_move_ids = (string) ($params["move_ids"] ?? "");
70 }
71
72 public function getType(): string
73 {
74 return "tax";
75 }
76
80 public function setAssignedObject(int $a_val): void
81 {
82 $this->assigned_object_id = $a_val;
83 }
84
85 public function getAssignedObject(): int
86 {
88 }
89
94 public function setMultiple(bool $a_val): void
95 {
96 $this->multiple = $a_val;
97 }
98
99 public function getMultiple(): bool
100 {
101 return $this->multiple;
102 }
103
104 public function setListInfo(string $a_val): void
105 {
106 $this->list_info = trim($a_val);
107 }
108
109 public function getListInfo(): string
110 {
111 return $this->list_info;
112 }
113
118 ilTaxAssignedItemInfo $a_item_info_obj,
119 string $a_component_id,
120 int $a_obj_id,
121 string $a_item_type
122 ): void {
123 $this->assigned_item_sorting = true;
124 $this->assigned_item_info_obj = $a_item_info_obj;
125 $this->assigned_item_comp_id = $a_component_id;
126 $this->assigned_item_obj_id = $a_obj_id;
127 $this->assigned_item_type = $a_item_type;
128 }
129
133 public function executeCommand(): void
134 {
135 $ilCtrl = $this->ctrl;
136
137 $cmd = $ilCtrl->getCmd("listTaxonomies");
138 $this->$cmd();
139 }
140
144 protected function initCreationForms(string $a_new_type): array
145 {
146 return array(
147 self::CFORM_NEW => $this->initCreateForm("tax")
148 );
149 }
150
151
155
156 public function editAOTaxonomySettings(): void
157 {
158 $this->listTaxonomies();
159 }
160
161 public function getCurrentTaxonomyId(): ?int
162 {
163 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->getAssignedObject());
164 $tax_id = $this->requested_tax_id;
165 if (in_array($tax_id, $tax_ids)) {
166 return $tax_id;
167 }
168 return null;
169 }
170
172 {
173 $tax_id = $this->getCurrentTaxonomyId();
174 if ($tax_id > 0) {
175 return new ilObjTaxonomy($tax_id);
176 }
177 return null;
178 }
179
183 public function listNodes(): void
184 {
186 $ilToolbar = $this->toolbar;
188 $ilCtrl = $this->ctrl;
189
190 $tax = $this->getCurrentTaxonomy();
191
192 $this->setTabs("list_items");
193
194 // show toolbar
195 $ilToolbar->setFormAction($ilCtrl->getFormAction($this));
196 $ilToolbar->addFormButton($lng->txt("tax_create_node"), "createTaxNode");
197
198 $ilToolbar->setCloseFormTag(false);
199
200 // show tree
201 $this->showTree();
202
203 $tax_node = $this->current_tax_node;
204 if ($tax_node === 0) {
205 $tax = $this->getCurrentTaxonomy();
206 if ($tax) {
207 $tree = $tax->getTree();
208 $tax_node = $tree->readRootId();
209 }
210 }
211
212 // show subitems
213 $table = new ilTaxonomyTableGUI(
214 $this,
215 "listNodes",
216 $tax->getTree(),
217 $tax_node,
218 $this->getCurrentTaxonomy()
219 );
220 $table->setOpenFormTag(false);
221
222 $tpl->setContent($table->getHTML());
223 }
224
228 public function createAssignedTaxonomy(): void
229 {
230 $this->create();
231 }
232
233 protected function checkPermissionBool(
234 string $perm,
235 string $cmd = "",
236 string $type = "",
237 ?int $node_id = null
238 ): bool {
239 if ($this->getAssignedObject() > 0) {
240 return true;
241 } else {
242 return parent::checkPermissionBool($perm, $cmd, $type, $node_id);
243 }
244 }
245
249 public function cancel(): void
250 {
251 $ilCtrl = $this->ctrl;
252 if ($this->getAssignedObject() > 0) {
253 $ilCtrl->redirect($this, "listTaxonomies");
254 }
255 parent::cancel();
256 }
257
258 public function save(): void
259 {
260 if ($this->getAssignedObject() > 0) {
261 $this->requested_new_type = "tax";
262 }
263 parent::saveObject();
264 }
265
269 protected function afterSave(ilObject $a_new_object): void
270 {
271 $ilCtrl = $this->ctrl;
273
274 if ($this->getAssignedObject() > 0) {
276 $a_new_object->getId(),
277 $this->getAssignedObject()
278 );
279 $ilCtrl->setParameter($this, "tax_id", $a_new_object->getId());
280 $this->tpl->setOnScreenMessage('success', $lng->txt("tax_added"), true);
281 $ilCtrl->redirect($this, "editSettings");
282 }
283 }
284
285 public function showTree(bool $a_ass_items = false): void
286 {
287 global $DIC;
288
289 $tax = $this->getCurrentTaxonomy();
290 $ctrl = $this->ctrl;
291
292 $cmd = $a_ass_items
293 ? "listAssignedItems"
294 : "listNodes";
295
296 $DIC->globalScreen()->tool()->context()->current()
297 ->addAdditionalData(
299 true
300 );
301 $DIC->globalScreen()->tool()->context()->current()
302 ->addAdditionalData(
304 $ctrl->getCurrentClassPath()
305 );
306 $DIC->globalScreen()->tool()->context()->current()
307 ->addAdditionalData(
309 $tax->getId()
310 );
311 $DIC->globalScreen()->tool()->context()->current()
312 ->addAdditionalData(
314 $cmd
315 );
316 $DIC->globalScreen()->tool()->context()->current()
317 ->addAdditionalData(
319 "showTree"
320 );
321
322 $tax_exp = new ilTaxonomyExplorerGUI(
323 $this,
324 "showTree",
325 $tax->getId(),
326 "ilobjtaxonomygui",
327 $cmd
328 );
329 $tax_exp->handleCommand();
330 }
331
335 public function createTaxNode(): void
336 {
338 $ilHelp = $this->help;
339
340 $this->setTabs("list_items");
341 $ilHelp->setSubScreenId("create_node");
342
343 $form = $this->initTaxNodeForm("create");
344 $tpl->setContent($form->getHTML());
345 }
346
347 // Init tax node form
348 public function initTaxNodeForm(string $a_mode = "edit"): ilPropertyFormGUI
349 {
351 $ilCtrl = $this->ctrl;
352
353 $form = new ilPropertyFormGUI();
354
355 // title
356 $ti = new ilTextInputGUI($this->lng->txt("title"), "title");
357 $form->addItem($ti);
358
359 // order nr
360 $tax = $this->getCurrentTaxonomy();
361 $or = null;
362 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
363 $or = new ilTextInputGUI($this->lng->txt("tax_order_nr"), "order_nr");
364 $or->setMaxLength(5);
365 $or->setSize(5);
366 $form->addItem($or);
367 }
368
369 if ($a_mode == "edit") {
370 $node = new ilTaxonomyNode($this->current_tax_node);
371 $ti->setValue($node->getTitle());
372 if (is_object($or)) {
373 $or->setValue($node->getOrderNr());
374 }
375 }
376
377 // save and cancel commands
378 if ($a_mode == "create") {
379 $form->addCommandButton("saveTaxNode", $lng->txt("save"));
380 $form->addCommandButton("listNodes", $lng->txt("cancel"));
381 $form->setTitle($lng->txt("tax_new_tax_node"));
382 } else {
383 $form->addCommandButton("updateTaxNode", $lng->txt("save"));
384 $form->addCommandButton("listNodes", $lng->txt("cancel"));
385 $form->setTitle($lng->txt("tax_edit_tax_node"));
386 }
387
388 $form->setFormAction($ilCtrl->getFormAction($this));
389
390 return $form;
391 }
392
396 public function saveTaxNode(): void
397 {
400 $ilCtrl = $this->ctrl;
401
402 $form = $this->initTaxNodeForm("create");
403 if ($form->checkInput()) {
404 // create node
405 $node = new ilTaxonomyNode();
406 $node->setTitle($form->getInput("title"));
407
408 $tax = $this->getCurrentTaxonomy();
409 $order_nr = "";
410 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
411 $order_nr = $form->getInput("order_nr");
412 }
413 if ($order_nr === "") {
414 $order_nr = ilTaxonomyNode::getNextOrderNr($tax->getId(), $this->current_tax_node);
415 }
416 //echo $order_nr; exit;
417 $node->setOrderNr($order_nr);
418 $node->setTaxonomyId($tax->getId());
419 $node->create();
420
421 // put in tree
422 ilTaxonomyNode::putInTree($tax->getId(), $node, $this->current_tax_node);
423
424 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $this->current_tax_node);
425
426 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
427 $ilCtrl->redirect($this, "listNodes");
428 } else {
429 $form->setValuesByPost();
430 $tpl->setContent($form->getHTML());
431 }
432 }
433
437 public function updateTaxNode(): void
438 {
440 $ilCtrl = $this->ctrl;
442
443 $form = $this->initTaxNodeForm("edit");
444 if ($form->checkInput()) {
445 // create node
446 $node = new ilTaxonomyNode($this->current_tax_node);
447 $node->setTitle($form->getInput("title"));
448
449 $tax = $this->getCurrentTaxonomy();
450 if ($tax->getSortingMode() == ilObjTaxonomy::SORT_MANUAL) {
451 $node->setOrderNr($form->getInput("order_nr"));
452 }
453
454 $node->update();
455
456 $this->tpl->setOnScreenMessage('info', $lng->txt("msg_obj_modified"), true);
457 $ilCtrl->redirect($this, "");
458 } else {
459 $form->setValuesByPost();
460 $tpl->setContent($form->getHTML());
461 }
462 }
463
467 public function deleteItems(): void
468 {
471 $ilCtrl = $this->ctrl;
472 $ilHelp = $this->help;
473 $body = $this->request->getParsedBody();
474
475 if (!isset($body["id"])) {
476 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
477 $ilCtrl->redirect($this, "listNodes");
478 }
479
480 $this->setTabs("list_items");
481 $ilHelp->setSubScreenId("del_items");
482
483 // $ilTabs->clearTargets();
484
485 $confirmation_gui = new ilConfirmationGUI();
486
487 $confirmation_gui->setFormAction($ilCtrl->getFormAction($this));
488 $confirmation_gui->setHeaderText($this->lng->txt("info_delete_sure"));
489
490 // Add items to delete
491 foreach ($body["id"] as $id) {
492 $confirmation_gui->addItem(
493 "id[]",
494 $id,
496 );
497 }
498
499 $confirmation_gui->setCancel($lng->txt("cancel"), "listNodes");
500 $confirmation_gui->setConfirm($lng->txt("confirm"), "confirmedDelete");
501
502 $tpl->setContent($confirmation_gui->getHTML());
503 }
504
508 public function confirmedDelete(): void
509 {
510 $ilCtrl = $this->ctrl;
511 $body = $this->request->getParsedBody();
512
513 // delete all selected objects
514 foreach ($body["id"] as $id) {
515 $node = new ilTaxonomyNode($id);
516 $tax = new ilObjTaxonomy($node->getTaxonomyId());
517 $tax_tree = $tax->getTree();
518 $node_data = $tax_tree->getNodeData($id);
519 if (is_object($node)) {
520 $node->delete();
521 }
522 if ($tax_tree->isInTree($id)) {
523 $tax_tree->deleteTree($node_data);
524 }
525 ilTaxonomyNode::fixOrderNumbers($node->getTaxonomyId(), $node_data["parent"]);
526 }
527
528 // feedback
529 $this->tpl->setOnScreenMessage('info', $this->lng->txt("info_deleted"), true);
530
531 $ilCtrl->redirect($this, "listNodes");
532 }
533
537 public function saveSorting(): void
538 {
539 $ilCtrl = $this->ctrl;
541 $body = $this->request->getParsedBody();
542
543 // save sorting
544 if (is_array($body["order"] ?? null)) {
545 foreach ($body["order"] as $k => $v) {
547 }
548 ilTaxonomyNode::fixOrderNumbers($this->getCurrentTaxonomyId(), $this->current_tax_node);
549 }
550
551 // save titles
552 if (is_array($body["title"] ?? null)) {
553 foreach ($body["title"] as $k => $v) {
555 (int) $k,
557 );
558 }
559 }
560 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"));
561 $ilCtrl->redirect($this, "listNodes");
562 }
563
567 public function moveItems(): void
568 {
569 $ilCtrl = $this->ctrl;
571 $ilToolbar = $this->toolbar;
572 $ilHelp = $this->help;
573 $body = $this->request->getParsedBody();
574
575 if (!isset($body["id"])) {
576 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("no_checkbox"), true);
577 $ilCtrl->redirect($this, "listNodes");
578 }
579
580 $this->setTabs("list_items");
581 $ilHelp->setSubScreenId("move_items");
582
583 $ilToolbar->addButton(
584 $lng->txt("cancel"),
585 $ilCtrl->getLinkTarget($this, "listNodes")
586 );
587
588 $this->tpl->setOnScreenMessage('info', $lng->txt("tax_please_select_target"));
589
590 if (is_array($body["id"])) {
591 $ilCtrl->setParameter($this, "move_ids", implode(",", $body["id"]));
592
594
595 $tax_exp = new ilTaxonomyExplorerGUI(
596 $this,
597 "moveItems",
598 $this->getCurrentTaxonomy()->getId(),
599 "ilobjtaxonomygui",
600 "pasteItems"
601 );
602 if (!$tax_exp->handleCommand()) {
603 //$tpl->setLeftNavContent($tax_exp->getHTML());
604 $tpl->setContent($tax_exp->getHTML() . "&nbsp;");
605 }
606 }
607 }
608
612 public function pasteItems(): void
613 {
615 $ilCtrl = $this->ctrl;
616 if ($this->requested_move_ids != "") {
617 $move_ids = explode(",", $this->requested_move_ids);
618 $tax = $this->getCurrentTaxonomy();
619 $tree = $tax->getTree();
620
621 $target_node = new ilTaxonomyNode($this->current_tax_node);
622 foreach ($move_ids as $m_id) {
623 // cross check taxonomy
624 $node = new ilTaxonomyNode((int) $m_id);
625 if ($node->getTaxonomyId() == $tax->getId() &&
626 ($target_node->getTaxonomyId() == $tax->getId() ||
627 $target_node->getId() == $tree->readRootId())) {
628 // check if target is not within the selected nodes
629 if ($tree->isGrandChild((int) $m_id, $target_node->getId()) ||
630 $m_id == $target_node->getId()) {
631 $this->tpl->setOnScreenMessage('failure', $lng->txt("tax_target_within_nodes"), true);
632 $this->ctrl->redirect($this, "listNodes");
633 }
634
635 // if target is not current place, move
636 $parent_id = $tree->getParentId((int) $m_id);
637 if ($parent_id != $target_node->getId()) {
638 $tree->moveTree((int) $m_id, $target_node->getId());
639 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $target_node->getId());
640 ilTaxonomyNode::fixOrderNumbers($tax->getId(), $parent_id);
641 }
642 }
643 }
644 }
645
646 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
647 $ilCtrl->redirect($this, "listNodes");
648 }
649
653 public function confirmDeleteTaxonomy(): void
654 {
655 $ilCtrl = $this->ctrl;
658
659 $tax = $this->getCurrentTaxonomy();
660
661 $cgui = new ilConfirmationGUI();
662 $cgui->setFormAction($ilCtrl->getFormAction($this));
663 $cgui->setHeaderText($lng->txt("tax_confirm_deletion"));
664 $cgui->setCancel($lng->txt("cancel"), "listTaxonomies");
665 $cgui->setConfirm($lng->txt("delete"), "deleteTaxonomy");
666
667 $cgui->addItem("id[]", 0, $tax->getTitle());
668
669 $tpl->setContent($cgui->getHTML());
670 }
671
675 public function deleteTaxonomy(): void
676 {
677 $ilCtrl = $this->ctrl;
679
680 $tax = $this->getCurrentTaxonomy();
681 $tax->delete();
682
683 $this->tpl->setOnScreenMessage('success', $lng->txt("tax_tax_deleted"), true);
684 $ilCtrl->redirect($this, "listTaxonomies");
685 }
686
690 public function listTaxonomies(): void
691 {
693 $ilToolbar = $this->toolbar;
695 $ilCtrl = $this->ctrl;
696
697 $tax_ids = ilObjTaxonomy::getUsageOfObject($this->getAssignedObject());
698 if (count($tax_ids) == 0 || $this->getMultiple()) {
699 $ilToolbar->addButton(
700 $lng->txt("tax_add_taxonomy"),
701 $ilCtrl->getLinkTarget($this, "createAssignedTaxonomy")
702 );
703 } else {
704 $this->tpl->setOnScreenMessage('info', $lng->txt("tax_max_one_tax"));
705 }
706
707 $tab = new ilTaxonomyListTableGUI(
708 $this,
709 "listTaxonomies",
710 $this->getAssignedObject(),
711 $this->getListInfo()
712 );
713
714 $tpl->setContent($tab->getHTML());
715 }
716
720 protected function setTabs($a_id = ""): void
721 {
722 $ilTabs = $this->tabs;
723 $ilCtrl = $this->ctrl;
726 $ilHelp = $this->help;
727
728 $ilTabs->clearTargets();
729
730 $ilHelp->setScreenIdComponent("tax");
731
732 $tpl->setTitle(ilObject::_lookupTitle($this->getCurrentTaxonomyId()));
733 $tpl->setDescription(ilObject::_lookupDescription($this->getCurrentTaxonomyId()));
734 $tpl->setTitleIcon(ilUtil::getImagePath("icon_tax.svg"));
735
736 $ilTabs->setBackTarget(
737 $lng->txt("back"),
738 $ilCtrl->getLinkTarget($this, "listTaxonomies")
739 );
740
741 $ilTabs->addTab(
742 "list_items",
743 $lng->txt("tax_nodes"),
744 $ilCtrl->getLinkTarget($this, "listNodes")
745 );
746 if ($this->assigned_item_sorting) {
747 $ilTabs->addTab(
748 "ass_items",
749 $lng->txt("tax_assigned_items"),
750 $ilCtrl->getLinkTarget($this, "listAssignedItems")
751 );
752 }
753 $ilTabs->addTab(
754 "settings",
755 $lng->txt("settings"),
756 $ilCtrl->getLinkTarget($this, "editSettings")
757 );
758
759 $ilTabs->activateTab($a_id);
760 }
761
765 public function editSettings(): void
766 {
768
769 $this->setTabs("settings");
770
771 $form = $this->initSettingsForm();
772 $tpl->setContent($form->getHTML());
773 }
774
776 {
778 $ilCtrl = $this->ctrl;
779
780 $tax = $this->getCurrentTaxonomy();
781
782 $form = new ilPropertyFormGUI();
783
784 // title
785 $ti = new ilTextInputGUI($lng->txt("title"), "title");
786 $ti->setMaxLength(200);
787
788 $form->addItem($ti);
789 $ti->setValue($tax->getTitle());
790
791 // description
792 $ta = new ilTextAreaInputGUI($lng->txt("description"), "description");
793 //$ta->setCols();
794 //$ta->setRows();
795 $form->addItem($ta);
796 $ta->setValue($tax->getDescription());
797
798 // sorting
799 $options = array(
800 ilObjTaxonomy::SORT_ALPHABETICAL => $lng->txt("tax_alphabetical"),
801 ilObjTaxonomy::SORT_MANUAL => $lng->txt("tax_manual")
802 );
803 $si = new ilSelectInputGUI($lng->txt("tax_node_sorting"), "sorting");
804
805 $si->setOptions($options);
806 $form->addItem($si);
807 $si->setValue($tax->getSortingMode());
808
809 // assigned item sorting
810 if ($this->assigned_item_sorting) {
811 $cb = new ilCheckboxInputGUI($lng->txt("tax_item_sorting"), "item_sorting");
812 $cb->setChecked($tax->getItemSorting());
813 $form->addItem($cb);
814 }
815
816 $form->addCommandButton("updateSettings", $lng->txt("save"));
817
818 $form->setTitle($lng->txt("settings"));
819 $form->setFormAction($ilCtrl->getFormAction($this));
820
821 return $form;
822 }
823
827 public function updateSettings(): void
828 {
831 $ilCtrl = $this->ctrl;
832
833 $form = $this->initSettingsForm();
834 if ($form->checkInput()) {
835 $tax = $this->getCurrentTaxonomy();
836 $tax->setTitle($form->getInput("title"));
837 $tax->setDescription($form->getInput("description"));
838 $tax->setSortingMode((int) $form->getInput("sorting"));
839 $tax->setItemSorting((bool) $form->getInput("item_sorting"));
840 $tax->update();
841
842 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
843 $ilCtrl->redirect($this, "editSettings");
844 } else {
845 $form->setValuesByPost();
846 $tpl->setContent($form->getHTML());
847 }
848 }
849
853 public function listAssignedItems(): void
854 {
856
857 $this->setTabs("ass_items");
858
859 // show tree
860 $this->showTree(true);
861
862 // list assigned items
863 $table = new ilTaxAssignedItemsTableGUI(
864 $this,
865 "listAssignedItems",
866 $this->current_tax_node,
867 $this->getCurrentTaxonomy(),
868 $this->assigned_item_comp_id,
869 $this->assigned_item_obj_id,
870 $this->assigned_item_type,
871 $this->assigned_item_info_obj
872 );
873
874 $tpl->setContent($table->getHTML());
875 }
876
880 public function saveAssignedItemsSorting(): void
881 {
883 $ilCtrl = $this->ctrl;
884 $body = $this->request->getParsedBody();
885
886 if (is_array($body["order"])) {
887 $order = $body["order"];
888 $tax_node = $this->current_tax_node;
889 foreach ($order as $a_item_id => $ord_nr) {
890 $tax_ass = new ilTaxNodeAssignment(
891 $this->assigned_item_comp_id,
892 $this->assigned_item_obj_id,
893 $this->assigned_item_type,
894 (int) $this->getCurrentTaxonomyId()
895 );
896 $tax_ass->setOrderNr($tax_node, $a_item_id, $ord_nr);
897 }
898 $tax_ass = new ilTaxNodeAssignment(
899 $this->assigned_item_comp_id,
900 $this->assigned_item_obj_id,
901 $this->assigned_item_type,
902 $this->getCurrentTaxonomyId()
903 );
904 $tax_ass->fixOrderNr($tax_node);
905 $this->tpl->setOnScreenMessage('success', $lng->txt("msg_obj_modified"), true);
906 }
907 $ilCtrl->redirect($this, "listAssignedItems");
908 }
909}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
return true
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Help GUI class.
loadLanguageModule(string $a_module)
Load language module.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
pasteItems()
Paste items (move operation)
createTaxNode()
Create tax node.
confirmDeleteTaxonomy()
Confirm taxonomy deletion.
saveSorting()
Save settings and sorting.
deleteItems()
Confirm deletion screen for items.
ilTaxAssignedItemInfo $assigned_item_info_obj
afterSave(ilObject $a_new_object)
After saving,.
listTaxonomies()
List taxonomies.
editSettings()
Edit settings.
executeCommand()
Execute command.
confirmedDelete()
Delete taxonomy nodes.
createAssignedTaxonomy()
Create assigned taxonomy.
getType()
Functions that must be overwritten.
__construct($a_id=0)
@inheritDoc
initCreationForms(string $a_new_type)
Init creation forms.
setTabs($a_id="")
@inheritDoc
updateTaxNode()
Update tax node.
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $node_id=null)
deleteTaxonomy()
Delete taxonomy.
updateSettings()
Update taxonomy settings.
saveAssignedItemsSorting()
Save assigned items sorting.
initTaxNodeForm(string $a_mode="edit")
activateAssignedItemSorting(ilTaxAssignedItemInfo $a_item_info_obj, string $a_component_id, int $a_obj_id, string $a_item_type)
Activate sorting mode of assigned objects.
setMultiple(bool $a_val)
Set multiple.
listAssignedItems()
List assigned items.
cancel()
Cancel creation.
showTree(bool $a_ass_items=false)
saveTaxNode()
Save tax node form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getUsageOfObject(int $a_obj_id, bool $a_include_titles=false)
static saveUsage(int $a_tax_id, int $a_obj_id)
New implementation of ilObjectGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupTitle(int $obj_id)
static _lookupDescription(int $obj_id)
This class represents a property form user interface.
This class represents a selection list 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 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 getNextOrderNr(int $a_tax_id, int $a_parent_id)
Put this node into the taxonomy tree.
static writeTitle(int $a_node_id, string $a_title)
Write title.
static writeOrderNr(int $a_node_id, int $a_order_nr)
static _lookupTitle(int $a_obj_id)
static putInTree(int $a_tax_id, ilTaxonomyNode $a_node, int $a_parent_id=0, int $a_target_node_id=0, int $a_order_nr=0)
static fixOrderNumbers(int $a_tax_id, int $a_parent_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a text area property in a property form.
This class represents a text property in a property form.
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type
$lng