19declare(strict_types=1);
39 $this->skill_tree_manager =
$DIC->skills()->internal()->manager()->getTreeManager();
40 $this->skill_tree_factory =
$DIC->skills()->internal()->factory()->tree();
41 $this->tree_repo =
$DIC->skills()->internal()->repo()->getTreeRepo();
47 public function getNodeData(
int $a_node_id, ?
int $a_tree_pk =
null): array
49 if ($a_node_id == 0) {
52 return parent::getNodeData($a_node_id, $a_tree_pk);
62 $root_node[
"parent"] = 0;
63 $root_node[
"depth"] = 0;
64 $root_node[
"obj_id"] = 0;
65 $root_node[
"child"] = 0;
78 public function getChilds(
int $a_node_id,
string $a_order =
"",
string $a_direction =
"ASC"): array
80 if ($a_node_id == 0) {
82 $trees = $this->skill_tree_manager->getTrees();
83 foreach ($trees as $obj_tree) {
84 $tree = $this->skill_tree_factory->getTreeById($obj_tree->getId());
85 $data = $tree->getNodeData($tree->readRootId());
91 return parent::getChilds($a_node_id, $a_order, $a_direction);
SkillTreeManager $skill_tree_manager
SkillTreeFactory $skill_tree_factory
ilSkillTreeRepository $tree_repo
getChilds(int $a_node_id, string $a_order="", string $a_direction="ASC")
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
Interface ilSkillTreeRepository.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc