소스 검색

[TwigBundle] added a flash tag

Fabien Potencier 15 년 전
부모
커밋
0319838cdc
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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'),
         );
     }