3 declare(strict_types=1);
40 public function __construct(
string $a_id, $a_parent_obj,
string $a_parent_cmd,
int $tree_id = 0)
44 $this->
lng = $DIC->language();
45 $this->
ctrl = $DIC->ctrl();
48 $this->skill_tree_manager = $DIC->skills()->internal()->manager()->getTreeManager();
49 $this->tree_factory = $DIC->skills()->internal()->factory();
52 $this->vtree = $this->tree_factory->tree()->getGlobalVirtualTree();
54 $this->vtree = $this->tree_factory->tree()->getVirtualTreeById($tree_id);
63 $this->show_draft_nodes = $a_val;
64 $this->vtree->setIncludeDrafts($a_val);
74 $this->show_outdated_nodes = $a_val;
75 $this->vtree->setIncludeOutdated($a_val);
88 return $this->vtree->getRootNode();
97 return (
string) $a_node[
"id"];
105 return parent::getDomNodeIdForNodeId(str_replace(
":",
"_", $a_node_id));
113 $id = parent::getNodeIdForDomNodeId($a_dom_node_id);
114 return str_replace(
"_",
":",
$id);
123 return $this->vtree->getChildsOfNode($a_parent_node_id);
134 $a_parent_id_parts = explode(
":", (
string) $a_node[
"id"]);
135 $a_parent_skl_tree_id = (
int) $a_parent_id_parts[0];
136 $a_parent_skl_template_tree_id = isset($a_parent_id_parts[1]) ? (
int) $a_parent_id_parts[1] : 0;
139 if ((
int) $a_node[
"parent"] == 0) {
140 $tree_obj = $this->skill_tree_manager->getTree($a_node[
"skl_tree_id"]);
141 $title = $tree_obj->getTitle();
143 $title = $a_node[
"title"];
147 if ($a_node[
"type"] ==
"skrt") {
148 $lng->
txt(
"skmg_skills");
160 $a_id_parts = explode(
":", (
string) $a_node[
"id"]);
161 $a_skl_template_tree_id = isset($a_id_parts[1]) ? (
int) $a_id_parts[1] : 0;
164 if ($a_node[
"type"] ==
"skrt") {
167 $type = $a_node[
"type"];
168 if ($type ==
"sktr") {
171 if ($type ==
"sktp") {
174 if ($type ==
"sctp") {
193 $id_parts = explode(
":", (
string) $a_node[
"id"]);
194 if (!isset($id_parts[1]) || $id_parts[1] == 0) {
196 $skill_id = $a_node[
"id"];
199 $skill_id = $id_parts[1] .
":" . $id_parts[0];
222 if ($lng->
exists(
"skmg_" . $a_node[
"type"])) {
223 return $lng->
txt(
"skmg_" . $a_node[
"type"]);
226 return $lng->
txt($a_node[
"type"]);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
exists(string $a_topic)
Check if language entry exists.
setSkipRootNode(bool $a_val)
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...
__construct(string $a_id, $a_parent_obj, string $a_parent_cmd, int $tree_id=0)
getChildsOfNode($a_parent_node_id)
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
SkillInternalFactoryService $tree_factory
static _lookupType(int $a_obj_id)
getNodeIdForDomNodeId(string $a_dom_node_id)
setShowDraftNodes(bool $a_val)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getDomNodeIdForNodeId($a_node_id)
Skill internal factory service.
bool $show_outdated_nodes
SkillTreeManager $skill_tree_manager
ilVirtualSkillTree $vtree
Virtual skill tree explorer.
setShowOutdatedNodes(bool $a_val)