public function updateAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
/** @var Institution $entity */
$entity = $em->getRepository('OjsJournalBundle:Institution')->find($id);
$this->throw404IfNotFound($entity);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
if ($editForm->isValid()) {
$em->persist($entity);
$em->flush();
$this->successFlashBag('successful.update');
return $this->redirectToRoute('ojs_admin_institution_edit', ['id' => $id]);
}
return $this->render('OjsAdminBundle:AdminInstitution:edit.html.twig', array('entity' => $entity, 'form' => $editForm->createView()));
}