Sfoglia il codice sorgente

[TwigBundle] added a flash tag

Fabien Potencier 15 anni fa
parent
commit
0319838cdc
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      src/Symfony/Bundle/TwigBundle/Extension/Helpers.php

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

@@ -48,6 +48,9 @@ class Helpers extends \Twig_Extension
 
             // {% render 'BlogBundle:Post:list' with ['path': ['limit': 2], 'alt': 'BlogBundle:Post:error'] %}
             new HelperTokenParser('render', '<template> [with <arguments:array>]', 'actions', 'render'),
+
+            // {% flash 'notice' %}
+            new HelperTokenParser('flash', '<name>', 'session', 'flash'),
         );
     }