Skip to content

Instantly share code, notes, and snippets.

@joshlopes
Created January 25, 2017 13:33
Show Gist options
  • Save joshlopes/e751f4317f7280b65af154b94cf14c86 to your computer and use it in GitHub Desktop.
Save joshlopes/e751f4317f7280b65af154b94cf14c86 to your computer and use it in GitHub Desktop.
public function editAction(Request $request, DeliveryZone $deliveryZone)
{
$formHandlerResponse = $this->getFormHandlerManager()
->createAndHandle(
$this->get('app.form_handler.delivery_zone_edit'),
$request,
[
'deliveryZone' => $deliveryZone,
]
);
if ($formHandlerResponse->isSuccessful()) {
return $this->redirectToRoute('app_rambo_delivery_zone_list');
}
return $this->render(
':rambo/deliveryZones:edit.html.twig',
[
'form' => $formHandlerResponse->getForm()->createView(),
'formHandlerResponse' => $formHandlerResponse
]
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment