Modify Value of Parameters of Request Modify Value of Parameters of Request symfony symfony

Modify Value of Parameters of Request


The replace method replaces all of the parameters in the request, so you probably do not want to do that.

I would use the set method instead - So you can do:

$request->request->set('tactill_customerbundle_customertype', $newValue)

You can read more in the Symfony2 documentation (http://api.symfony.com/2.0/) - you are looking for Symfony\Component\HttpFoundation\Request (which is the $request variable), which then returns a Symfony\Component\HttpFoundation\ParameterBag when you call the request() method.