在Symfony1我可以:Get請求參數中嵌入控制器
blog:
url: /blog/slug
param: { module: blog, action: index }
和在動作/控制器I可以得到團狀:$請求 - >的getParameter( '蛞蝓');
在Symfony2中:
blog:
path: /blog/{slug}
defaults: { _controller: AcmeBlogBundle:Blog:show }
和我創建 「組件」 一樣Symfony1 - http://symfony.com/doc/current/book/templating.html#templating-embedding-controller
我怎樣才能得到嵌入控制器塞?我試過了:
$request->query->get('foo');
$request->request->get('bar');
但是這仍然返回null。在AcmeBlogBundle:博客:show controller工作正常。
顯示你的代碼,您嵌入的內容。 –