Bolt\Twig\TwigExtension::menu PHP Method

menu() public method

See also: Bolt\Twig\Handler\HtmlHandler::menu()
public menu ( Twig_Environment $env, $identifier = '', $template = '_sub_menu.twig', $params = [] )
$env Twig_Environment
    public function menu(\Twig_Environment $env, $identifier = '', $template = '_sub_menu.twig', $params = [])
    {
        return $this->handlers['html']->menu($env, $identifier, $template, $params, $this->safe);
    }

Usage Example

コード例 #1
0
ファイル: TwigExtensionTest.php プロジェクト: Twiebie/bolt
 public function testMenu()
 {
     $app = $this->getApp();
     $handlers = $this->getTwigHandlers($app);
     $handlers['html'] = $this->getMockHandler('HtmlHandler', 'menu');
     $twig = new TwigExtension($app, $handlers, true);
     $twig->menu($app['twig'], null, null, null, null);
 }