Exemple #1
0
 /**
  * Set children
  *
  * @param NodeInterface $node
  * @internal param array $children
  * @return NodeInterface
  */
 public function addChild(NodeInterface $node)
 {
     $node->setParentId($this->getId());
     if (!in_array($node->getId(), $this->children)) {
         $this->children[] = $node->getId();
     }
     return $this;
 }