ILIAS  release_8 Revision v8.24
class.ilContainerSkillGUI.php
Go to the documentation of this file.
1<?php
2
28{
29 protected ilCtrl $ctrl;
30 protected ilTabsGUI $tabs;
31 protected ilLanguage $lng;
36 protected int $ref_id = 0;
37
38 public function __construct(ilContainerGUI $a_container_gui)
39 {
40 global $DIC;
41
42 $this->ctrl = $DIC->ctrl();
43 $this->tabs = $DIC->tabs();
44 $this->lng = $DIC->language();
45 $this->access = $DIC->access();
46
47 $this->container_gui = $a_container_gui;
48 /* @var $obj ilContainer */
49 $obj = $this->container_gui->getObject();
50 $this->container = $obj;
51 $this->ref_id = $this->container->getRefId();
52 $this->skmg_settings = new ilSkillManagementSettings();
53 }
54
55 public function executeCommand(): void
56 {
58
59 $next_class = $this->ctrl->getNextClass($this);
60 $cmd = $this->ctrl->getCmd("show");
61
62 $this->addTabs();
63
64 switch ($next_class) {
65 case "ilcontskillpresentationgui":
66 if ($this->access->checkAccess("read", "", $this->ref_id)) {
67 $gui = new ilContSkillPresentationGUI($this->container_gui);
68 $ctrl->forwardCommand($gui);
69 }
70 break;
71
72 case "ilcontskilladmingui":
73 if ($this->access->checkAccess("write", "", $this->ref_id) || $this->access->checkAccess("grade", "", $this->ref_id)) {
74 $gui = new ilContSkillAdminGUI($this->container_gui);
75 $ctrl->forwardCommand($gui);
76 }
77 break;
78
79 default:
80 /*if (in_array($cmd, array("show")))
81 {
82 $this->$cmd();
83 }*/
84 }
85 }
86
87 public function addTabs(): void
88 {
92
93 if ($this->access->checkAccess("read", "", $this->ref_id)) {
95 "list",
96 $lng->txt("cont_skill_show"),
97 $ctrl->getLinkTargetByClass("ilContSkillPresentationGUI", "")
98 );
99 }
100
101 if ($this->access->checkAccess("grade", "", $this->ref_id)) {
103 "members",
104 $lng->txt("cont_skill_members"),
105 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listMembers")
106 );
107 }
108
109 if ($this->access->checkAccess("write", "", $this->ref_id)) {
111 "competences",
112 $lng->txt("cont_skill_assigned_comp"),
113 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listCompetences")
114 );
115
116 if ($this->skmg_settings->getLocalAssignmentOfProfiles()
117 || $this->skmg_settings->getAllowLocalProfiles()) {
119 "profiles",
120 $lng->txt("cont_skill_assigned_profiles"),
121 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "listProfiles")
122 );
123 }
124
126 "settings",
127 $lng->txt("settings"),
128 $ctrl->getLinkTargetByClass("ilContSkillAdminGUI", "settings")
129 );
130 }
131 }
132}
Container skills administration.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilContainerGUI This is a base GUI class for all container objects in ILIAS: root folder,...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilContainerGUI $a_container_gui)
ilSkillManagementSettings $skmg_settings
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilCtrl provides processing control methods.
getLinkTargetByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
forwardCommand(object $a_gui_object)
@inheritDoc
language handling
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
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...
addSubTab(string $a_id, string $a_text, string $a_link, string $a_frame="")
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...