I have a controller function which return a response with a value, and I want to call this controller from twig so I use:
{% render "UaePortailBundle:Note:isRempli" with { 'module_id' : module.id , 'year' : year } %}
the problem is that I want to set this returned value into a variable “x”
I tried this, but it doesn’t work.
{% set x = {% render "UaePortailBundle:Note:isRempli" with { 'module_id' : module.id , 'year' : year } %} %}
According to the documentation, you can do: