public function getPathAsString(ItemInterface $item, $separator = ' > ')
    {
        $children = array();
        $obj = $item;

        do {
            $children[] = $obj->getLabel();
        } while ($obj = $obj->getParent());

        return implode($separator, array_reverse($children));
    }
public function getPathAsString(ItemInterface $item, $separator = ' > ')
    {
        $children = array();
        $obj = $item;

        do {
            $children[] = $obj->getLabel();
        } while ($obj = $obj->getParent());

        return implode($separator, array_reverse($children));
    }
public function getPathAsString ( ItemInterface $ item , $ separator = ' > ' ) { $ children = array ( ) ; $ obj = $ item ; do { $ children [ ] = $ obj -> getLabel ( ) ; } while ( $ obj = $ obj -> getParent ( ) ) ; return implode ( $ separator , array_reverse ( $ children ) ) ; }
A string representation of this menu item

e.g. Top Level > Second Level > This menu

@param ItemInterface $item
@param string        $separator

@return string
A string representation of this menu item