当我在控制器中执行forward()时,我失去了我的路由和route_parameters。Symfony2为什么前向嵌套请求对象?
当我有ParentAction时,它会转发到ChildAction。在Childaction中,我做return $this->render('myTemplate.html.twig', array());
然后请求属性被嵌套!
所以当模板得到渲染,而不是$request['attributes']['_route_parameters']
我得到$request['attributes']['request']['attributes']['_route_parameters']
。
尽管在ChildAction中,当我做$this->getRequest();
时,hierarchie是正常的。
这是一个错误,还是我做错了什么?
你可以检查我的编辑?我可以阅读请求等,但有一些奇怪的事情发生。 – Nealv 2013-02-28 10:20:50