src/Kunstmaan/NodeBundle/Helper/Menu/SimpleTreeView.php
public function addItem($parentId, $data)
    {
        if (empty($parentId)) {
            $this->items[0][] = $data;
        } else {
            $this->items[$parentId][] = $data;
        }
    }
public function addItem($parentId, $data)
    {
        if (empty($parentId)) {
            $this->items[0][] = $data;
        } else {
            $this->items[$parentId][] = $data;
        }
    }
public function addItem ( $ parentId , $ data ) { if ( empty ( $ parentId ) ) { $ this -> items [ 0 ] [ ] = $ data ; } else { $ this -> items [ $ parentId ] [ ] = $ data ; } }
Add an item to the tree array

@param int          $parentId
@param array|object $data
Add an item to the tree array