I want to add a parameter to the ParameterBag in a symfony2 Request.
So the array looks like this:
array (size=2)
'editor' =>
array (size=6)
'_token' => string '5797a4faf1fced89404b80fb04b3cadffc99695e' (length=40)
'login' => string 'editor' (length=6)
'firstName' => string 'Joh' (length=3)
'lastName' => string 'Ha' (length=2)
'address' =>
array (size=6)
'time_zone_code' => string 'Africa/Abidjan' (length=14)
And I want to add a field to the editor array. I tried this
$request->request->add(array('editor[password]' => $password));
But of course this just adds a field named editor[password] after the editor array.
Do I have to replace the whole ParameterBag or is there a method to add the value?