Symfony setting, adding or intercepting the public request object

In Symfony, you can alter the public request attribute from the $request object and set or add parameters. Example:

$request->request->set("formField1", "value1");
$request->request->set("formField2", "value2");

You can also add new form fields and values with ->add:

$request->request->add(array("formField1"=>"value1", "formField2"=>"value2"));

About Author:

Senior Cloud Software Engineer and 25+ years experienced video production, video editing and 3D animation services for a variety of global clients including local video production here in Jacksonville, Florida.

Leave a Comment

Your email address will not be published. Required fields are marked *