Symfony2: in Twig, pass Request with Render function

前端 未结 3 944
感情败类
感情败类 2020-12-17 15:27

I understand that using {% render() %} automatically forces a new request object to be sent, but im curious if theres a way to pass in the originating request a

3条回答
  •  渐次进展
    2020-12-17 16:01

    If I understand correctly, you're looking for this:

    {% render "MyBundle:Controller:someAction" with { 'originalRequest' : app.request } %}
    

提交回复
热议问题