3 declare(strict_types=1);
40 $this->skill_tree_manager = $DIC->skills()->internal()->manager()->getTreeManager();
41 $this->skill_tree_factory = $DIC->skills()->internal()->factory()->tree();
42 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
48 public function getNodeData(
int $a_node_id, ?
int $a_tree_pk = null): array
50 if ($a_node_id == 0) {
53 return parent::getNodeData($a_node_id, $a_tree_pk);
63 $root_node[
"parent"] = 0;
64 $root_node[
"depth"] = 0;
65 $root_node[
"obj_id"] = 0;
66 $root_node[
"child"] = 0;
79 public function getChilds(
int $a_node_id,
string $a_order =
"",
string $a_direction =
"ASC"): array
81 if ($a_node_id == 0) {
83 $trees = $this->skill_tree_manager->getTrees();
84 foreach ($trees as $obj_tree) {
85 $tree = $this->skill_tree_factory->getTreeById($obj_tree->getId());
86 $data = $tree->getNodeData($tree->readRootId());
92 return parent::getChilds($a_node_id, $a_order, $a_direction);
ilSkillTreeRepository $tree_repo
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
SkillTreeFactory $skill_tree_factory
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
SkillTreeManager $skill_tree_manager
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")