From f89eb39fe069e0e6a5a8c9c0dd8696ba92b2c899 Mon Sep 17 00:00:00 2001 From: Jerzy Zawadzki Date: Sat, 29 Nov 2014 21:14:37 +0100 Subject: [PATCH] Updated twig reference with optimizations and paths --- reference/configuration/twig.rst | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/reference/configuration/twig.rst b/reference/configuration/twig.rst index 4c72abb03c1..bad80fc4da2 100644 --- a/reference/configuration/twig.rst +++ b/reference/configuration/twig.rst @@ -44,6 +44,8 @@ TwigBundle Configuration ("twig") strict_variables: ~ auto_reload: ~ optimizations: ~ + paths: + "%kernel.root_dir%/../vendor/acme/foo-bar/templates": foo_bar .. code-block:: xml @@ -53,12 +55,14 @@ TwigBundle Configuration ("twig") xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd http://symfony.com/schema/dic/twig http://symfony.com/schema/dic/twig/twig-1.0.xsd"> - + MyBundle::form.html.twig 3.14 + AcmeFooBundle:Exception:showException + %kernel.root_dir%/../vendor/acme/foo-bar/templates @@ -74,13 +78,18 @@ TwigBundle Configuration ("twig") 'foo' => '@bar', 'pi' => 3.14, ), - 'auto_reload' => '%kernel.debug%', - 'autoescape' => true, - 'base_template_class' => 'Twig_Template', - 'cache' => '%kernel.cache_dir%/twig', - 'charset' => '%kernel.charset%', - 'debug' => '%kernel.debug%', - 'strict_variables' => false, + 'auto_reload' => '%kernel.debug%', + 'autoescape' => true, + 'base_template_class' => 'Twig_Template', + 'cache' => '%kernel.cache_dir%/twig', + 'charset' => '%kernel.charset%', + 'debug' => '%kernel.debug%', + 'strict_variables' => false, + 'exception_controller' => 'AcmeFooBundle:Exception:showException', + 'optimizations' => true, + 'paths' => array( + '%kernel.root_dir%/../vendor/acme/foo-bar/templates' => 'foo_bar', + ), )); Configuration