Exemplo n.º 1
0
 /**
  * Sets a DataTree as child. Children are returned in same order as first insertion.
  * If composite already have a child with same name it will be overwritten
  *
  * @param DataTreeBase $dataTree
  * @param string $placeMark if you want tree to be assigned to other key
  *
  */
 public function setChildTree(DataTreeBase $dataTree)
 {
     $name = $dataTree->getName();
     $childrenMapIndex = $this->getIndexByName($name);
     if ($childrenMapIndex === false) {
         $treeIndex = $this->addChild($dataTree);
         $this->childrenMap[$name] = $treeIndex;
     } else {
         $this->setChild($dataTree, $childrenMapIndex);
     }
 }