public function menu(Environment $env, $identifier = '', $template = '_sub_menu.twig', $params = [])
    {
        $menu = $this->menu->menu($identifier);

        $context = [
            'name' => $menu->getName(),
            'menu' => $menu->getItems(),
        ];
        $context += (array) $params;

        return $env->render($template, $context);
    }
public function menu(Environment $env, $identifier = '', $template = '_sub_menu.twig', $params = [])
    {
        $menu = $this->menu->menu($identifier);

        $context = [
            'name' => $menu->getName(),
            'menu' => $menu->getItems(),
        ];
        $context += (array) $params;

        return $env->render($template, $context);
    }
public function menu ( Environment $ env , $ identifier = '' , $ template = '_sub_menu.twig' , $ params = [ ] ) { $ menu = $ this -> menu -> menu ( $ identifier ) ; $ context = [ 'name' => $ menu -> getName ( ) , 'menu' => $ menu -> getItems ( ) , ] ; $ context += ( array ) $ params ; return $ env -> render ( $ template , $ context ) ; }
Output a menu.

@param Environment $env
@param string      $identifier Identifier for a particular menu
@param string      $template   the template to use
@param array       $params     extra parameters to pass on to the menu template

@return string|null
Output a menu .