src/Tree.php
public function addMany($parentName, array $namedItems, $prepend = false)
    {
        foreach ($namedItems as $name => $item) {
            $this->add($parentName, $name, $item, $prepend);
        }

        return $this;
    }
public function addMany($parentName, array $namedItems, $prepend = false)
    {
        foreach ($namedItems as $name => $item) {
            $this->add($parentName, $name, $item, $prepend);
        }

        return $this;
    }
public function addMany ( $ parentName , array $ namedItems , $ prepend = false ) { foreach ( $ namedItems as $ name => $ item ) { $ this -> add ( $ parentName , $ name , $ item , $ prepend ) ; } return $ this ; }
Adds multiple nodes to tree.

@param string|null $parentName root node will be used if null
@param array $namedItems array with nodes where keys are node names
@param bool $prepend if true, nodes will be prepended, otherwise appended to parent
@return $this
Adds multiple nodes to tree .