public function updateAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('OjsJournalBundle:ContactTypes')->find($id);
$this->throw404IfNotFound($entity);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
if ($editForm->isValid()) {
$em->flush();
$this->successFlashBag('successful.update');
return $this->redirect($this->generateUrl('ojs_admin_contact_type_edit', array('id' => $id)));
}
return $this->render('OjsAdminBundle:AdminContactType:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView()));
}