Explorar el Código

Overrides the default {% include %} token parser since it loads through the right template renderer

henrikbjorn hace 14 años
padre
commit
30cf086828
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/Symfony/Bundle/TwigBundle/Extension/HelpersExtension.php

+ 3 - 0
src/Symfony/Bundle/TwigBundle/Extension/HelpersExtension.php

@@ -63,6 +63,9 @@ class HelpersExtension extends \Twig_Extension
 
             // {% flash 'notice' %}
             new HelperTokenParser('flash', '<name>', 'templating.helper.session', 'getFlash'),
+
+            // {% include 'sometemplate.php' with ['something' : 'something2'] %}
+            new HelperTokenParser('include', '<name> [with <arguments:array>]', 'templating.engine', 'render'),
         );
     }