how to pass all request query parameters to embedded controllers in twig symfony 2?

php, symfony, twig

Solution

Try this:

{{ render(controller("SomeBundle:Foo:bar", {'all': app.request.query.all}) }}

and in action store it in `$all` variable

public function barAction($all) {
    // other your code
}

Problem

``` {{ render(controller("SomeBundle:Foo:Bar", {HERE I WANT TO PASS ALL query parameters app.request.query.all}) }} ``` So can I access all master request query parameters in sub request and the subrequest should also run independently?

Original source