src/Knp/Menu/Twig/Helper.php
public function render($menu, array $options = array(), $renderer =  null)
    {
        $menu = $this->castMenu($menu);

        return $this->rendererProvider->get($renderer)->render($menu, $options);
    }
public function render($menu, array $options = array(), $renderer =  null)
    {
        $menu = $this->castMenu($menu);

        return $this->rendererProvider->get($renderer)->render($menu, $options);
    }
Renders a menu with the specified renderer.

If the argument is an array, it will follow the path in the tree to
get the needed item. The first element of the array is the whole menu.
If the menu is a string instead of an ItemInterface, the provider
will be used.

@param ItemInterface|string|array $menu
@param array                      $options
@param string                     $renderer

@return string

@throws \InvalidArgumentException