3declare(strict_types=1);
 
   39        if ($this->subnodes !== []) {
 
   40            throw new \Exception(
"Use 'setSubnodes' during construction only", 1);
 
   43            $this->subnodes[$subnode->getId()] = $subnode->withContainer($this);
 
   53        $this->container = $node;
 
   65        $clone->subnodes[$node->getId()] = $node->withContainer($this);
 
   71        return array_values($this->subnodes);
 
   76        return $this->subnodes[
$id];
 
   81        $ret = [$this->
getId()];
 
   83        while ($node = $node->getContainer()) {
 
   84            $ret[] = $node->getId();
 
   86        return array_reverse($ret);
 
   94        if ($node->getId() == 
$id) {
 
   95            return $node->getPath();
 
   97        foreach ($node->getSubnodes() as $subnode) {
 
withContainer(Node $node)
this is only used internally - do not use apart from constructing the tree!
 
findSubnodePath(string $id, ?Node $node=null)
 
setSubnodes(array $subnodes)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...