19 declare(strict_types=1);
40 public function __construct($a_parent_obj,
string $a_parent_cmd,
int $tree_id = 0)
44 $this->
lng = $DIC->language();
45 $this->
ctrl = $DIC->ctrl();
46 $this->admin_gui_request = $DIC->skills()->internal()->gui()->admin_request();
49 $this->requested_skill_node_id = $this->admin_gui_request->getNodeId();
50 $this->requested_tref_id = $this->admin_gui_request->getTrefId();
66 $a_parent_id_parts = explode(
":", $a_node[
"id"]);
67 $a_parent_skl_tree_id = (
int) $a_parent_id_parts[0];
68 $a_parent_skl_template_tree_id = isset($a_parent_id_parts[1]) ? (
int) $a_parent_id_parts[1] : 0;
71 $title = $a_node[
"title"];
74 if ($a_node[
"type"] ==
"skrt") {
75 $tree_obj = $this->skill_tree_manager->getTree($a_node[
"skl_tree_id"]);
76 $title = $tree_obj->getTitle();
78 if ($a_node[
"type"] ==
"sktr") {
85 if ($a_parent_skl_template_tree_id == 0 || $a_node[
"type"] ==
"sktr") {
86 $title =
"<u>" . $title .
"</u>";
91 if ($this->vtree->isOutdated($a_node[
"id"])) {
92 $title =
"<span class='light'>" . $title .
"</span>";
103 $a_parent_id_parts = explode(
":", $a_node[
"id"]);
104 $a_parent_skl_tree_id = (
int) $a_parent_id_parts[0];
105 $a_parent_skl_template_tree_id = isset($a_parent_id_parts[1]) ? (
int) $a_parent_id_parts[1] : 0;
109 if ($a_node[
"type"] ==
"skrt") {
111 } elseif (in_array($a_node[
"type"], array(
"skll",
"scat",
"sctr",
"sktr",
"sctp",
"sktp"))) {
113 $a_parent_skl_tree_id,
116 (
int) ($this->vtree->isDraft($a_node[
"id"]) || $this->vtree->isOutdated($a_node[
"id"]))
130 $id_parts = explode(
":", $a_node[
"id"]);
131 if (!isset($id_parts[1]) || $id_parts[1] == 0) {
133 $skill_id = $id_parts[0];
137 $tref_id = $id_parts[0];
138 $skill_id = $id_parts[1];
141 if ($this->requested_skill_node_id ==
"" && $a_node[
"type"] ==
"skrt") {
145 if ($skill_id == $this->requested_skill_node_id &&
146 ($this->requested_tref_id == $tref_id)) {
159 $id_parts = explode(
":", $a_node[
"id"]);
160 if (!isset($id_parts[1]) || $id_parts[1] == 0) {
162 $skill_id = $id_parts[0];
166 $tref_id = $id_parts[0];
167 $skill_id = $id_parts[1];
171 "skrt" =>
"ilskillrootgui",
172 "scat" =>
"ilskillcategorygui",
173 "sktr" =>
"ilskilltemplatereferencegui",
174 "skll" =>
"ilbasicskillgui",
175 "sktp" =>
"ilbasicskilltemplategui",
176 "sctp" =>
"ilskilltemplatecategorygui" 180 "skrt" =>
"listSkills",
181 "scat" =>
"listItems",
182 "sktr" =>
"listItems",
185 "sctp" =>
"listItems" 188 $gui_class = $gui_class[$a_node[
"type"]];
189 $cmd = $cmd[$a_node[
"type"]];
191 $ilCtrl->setParameterByClass($gui_class,
"tref_id", $tref_id);
192 $ilCtrl->setParameterByClass($gui_class,
"node_id", $skill_id);
193 $ret = $ilCtrl->getLinkTargetByClass([
"ilAdministrationGUI",
"ilObjSkillManagementGUI",
194 "ilSkillTreeAdminGUI",
"ilObjSkillTreeGUI", $gui_class], $cmd);
195 $ilCtrl->setParameterByClass($gui_class,
"node_id", $this->requested_skill_node_id);
196 $ilCtrl->setParameterByClass($gui_class,
"tref_id", $this->requested_tref_id);
int $requested_skill_node_id
static _lookupTemplateId(int $a_obj_id)
setSkipRootNode(bool $a_val)
Request wrapper for guis in skill administration.
static _lookupTitle(int $a_obj_id, int $a_tref_id=0)
SkillAdminGUIRequest $admin_gui_request
setShowDraftNodes(bool $a_val)
static getImagePath(string $image_name, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
static getIconPath(int $a_obj_id, string $a_type, string $a_size="", int $a_status=0)
isNodeHighlighted($a_node)
__construct($a_parent_obj, string $a_parent_cmd, int $tree_id=0)
__construct(Container $dic, ilPlugin $plugin)
Explorer class that works on tree objects (Services/Tree)
static _lookupSelfEvaluation(int $a_obj_id)
Virtual skill tree explorer.
setShowOutdatedNodes(bool $a_val)