Command/DumpMenuCommand.php
private function _printMenu(OutputInterface $output, MenuItem $menu, $depth = 0)
    {
        $prefix = '';
        if ( $depth != 0 ) {
            $prefix = '|->';
            if ( $depth > 1 ) {
                $prefix = str_repeat('    ', $depth - 1).$prefix;
            }
        }
        $line = sprintf(
            '%s <info>%s</info> : <comment>%s</comment> (%s)',
            $prefix,
            $menu->getName(),
            $menu->getUri(),
            $menu->getTranslationDomain()
        );
        $output->writeln($line);
        foreach ($menu->getChildren() as $child) {
            $this->_printMenu($output, $child, $depth+1);
        }
    }
private function _printMenu(OutputInterface $output, MenuItem $menu, $depth = 0)
    {
        $prefix = '';
        if ( $depth != 0 ) {
            $prefix = '|->';
            if ( $depth > 1 ) {
                $prefix = str_repeat('    ', $depth - 1).$prefix;
            }
        }
        $line = sprintf(
            '%s <info>%s</info> : <comment>%s</comment> (%s)',
            $prefix,
            $menu->getName(),
            $menu->getUri(),
            $menu->getTranslationDomain()
        );
        $output->writeln($line);
        foreach ($menu->getChildren() as $child) {
            $this->_printMenu($output, $child, $depth+1);
        }
    }
[_printMenu description]

@param OutputInterface $output [description]
@param MenuItem        $menu   [description]
@param integer         $depth  [description]

@return [type]