Global virtual skill tree.
More...
Global virtual skill tree.
- Author
- Thomas Famula famul.nosp@m.a@le.nosp@m.ifos..nosp@m.de
Definition at line 29 of file class.ilGlobalVirtualSkillTree.php.
◆ __construct()
| ilGlobalVirtualSkillTree::__construct |
( |
| ) |
|
Definition at line 36 of file class.ilGlobalVirtualSkillTree.php.
References $DIC, and ILIAS\GlobalScreen\Provider\__construct().
41 $this->skill_tree_manager = $DIC->skills()->internal()->manager()->getTreeManager();
42 $this->skill_tree_factory = $DIC->skills()->internal()->factory()->tree();
43 $this->tree_repo = $DIC->skills()->internal()->repo()->getTreeRepo();
__construct(Container $dic, ilPlugin $plugin)
◆ getChildsOfNode()
| ilGlobalVirtualSkillTree::getChildsOfNode |
( |
string |
$a_parent_id | ) |
|
- Returns
- array{id: int, child: int, parent: int}[]
Definition at line 65 of file class.ilGlobalVirtualSkillTree.php.
References $data, ilVirtualSkillTree\$tree, ilTree\getNodeData(), ILIAS\Repository\int(), and ilTree\readRootId().
67 if ($a_parent_id ===
"0") {
69 $trees = $this->skill_tree_manager->getTrees();
70 foreach ($trees as $obj_tree) {
71 $tree = $this->skill_tree_factory->getTreeById($obj_tree->getId());
78 $parent_id_parts = explode(
":", $a_parent_id);
79 $parent_skl_tree_id = (
int) $parent_id_parts[0];
80 $tree_id = $this->tree_repo->getTreeIdForNodeId($parent_skl_tree_id);
81 $this->tree = $this->skill_tree_factory->getTreeById($tree_id);
82 return parent::getChildsOfNode($a_parent_id);
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
◆ getRootNode()
| ilGlobalVirtualSkillTree::getRootNode |
( |
| ) |
|
- Returns
- array{id: int, parent: int, depth: int, obj_id: int}
Definition at line 49 of file class.ilGlobalVirtualSkillTree.php.
52 $root_node = $this->tree->getNodeData($root_id);
55 $root_node[
"parent"] = 0;
56 $root_node[
"depth"] = 0;
57 $root_node[
"obj_id"] = 0;
◆ getSubTreeForTreeId()
| ilGlobalVirtualSkillTree::getSubTreeForTreeId |
( |
string |
$a_tree_id | ) |
|
◆ $root_node_processed
| bool ilGlobalVirtualSkillTree::$root_node_processed = false |
|
protected |
◆ $skill_tree_factory
◆ $skill_tree_manager
◆ $tree_repo
The documentation for this class was generated from the following file: