38 public function __construct(
string $a_id, $a_parent_obj,
string $a_parent_cmd,
int $tree_id = 0)
42 $this->
lng = $DIC->language();
43 $this->
ctrl = $DIC->ctrl();
46 $this->skill_tree_manager = $DIC->skills()->internal()->manager()->getTreeManager();
47 $this->tree_factory = $DIC->skills()->internal()->factory();
50 $this->vtree = $this->tree_factory->tree()->getGlobalVirtualTree();
52 $this->vtree = $this->tree_factory->tree()->getVirtualTreeById($tree_id);
61 $this->show_draft_nodes = $a_val;
62 $this->vtree->setIncludeDrafts($a_val);
72 $this->show_outdated_nodes = $a_val;
73 $this->vtree->setIncludeOutdated($a_val);
86 return $this->vtree->getRootNode();
103 return parent::getDomNodeIdForNodeId(str_replace(
":",
"_", $a_node_id));
111 $id = parent::getNodeIdForDomNodeId($a_dom_node_id);
112 return str_replace(
"_",
":",
$id);
121 return $this->vtree->getChildsOfNode($a_parent_node_id);
132 $a_parent_id_parts = explode(
":", (
string) $a_node[
"id"]);
133 $a_parent_skl_tree_id = (
int) $a_parent_id_parts[0];
134 $a_parent_skl_template_tree_id = isset($a_parent_id_parts[1]) ? (
int) $a_parent_id_parts[1] : 0;
137 if ((
int) $a_node[
"parent"] == 0) {
138 $tree_obj = $this->skill_tree_manager->getTree($a_node[
"skl_tree_id"]);
139 $title = $tree_obj->getTitle();
141 $title = $a_node[
"title"];
145 if ($a_node[
"type"] ==
"skrt") {
146 $lng->
txt(
"skmg_skills");
158 $a_id_parts = explode(
":", (
string) $a_node[
"id"]);
159 $a_skl_template_tree_id = isset($a_id_parts[1]) ? (
int) $a_id_parts[1] : 0;
162 if ($a_node[
"type"] ==
"skrt") {
165 $type = $a_node[
"type"];
166 if (
$type ==
"sktr") {
169 if (
$type ==
"sktp") {
172 if (
$type ==
"sctp") {
191 $id_parts = explode(
":", (
string) $a_node[
"id"]);
192 if (!isset($id_parts[1]) || $id_parts[1] == 0) {
194 $skill_id = $a_node[
"id"];
197 $skill_id = $id_parts[1] .
":" . $id_parts[0];
220 if ($lng->
exists(
"skmg_" . $a_node[
"type"])) {
221 return $lng->
txt(
"skmg_" . $a_node[
"type"]);
224 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.
__construct(Container $dic, ilPlugin $plugin)
bool $show_outdated_nodes
SkillTreeManager $skill_tree_manager
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilVirtualSkillTree $vtree
Virtual skill tree explorer.
setShowOutdatedNodes(bool $a_val)