symfony/symfony — Issue #3058: app variable is not available in form theme
Author: ma2thieu
Created: 2012-01-08 11:11:50+00:00
State: open

With symfony 2.0.9 this code :

{% form_theme form _self %}

{% block field_label %}
{{ app.session.locale }}
{% endblock %}

{% block container %}
{{ form_widget(form) }}
{% endblock %}

generate an error :

Variable "app" does not exist in myBundle:Entity:view.html.twig at line 7
500 Internal Server Error - Twig_Error_Runtime