public function updateAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
$entity = $this->getDoctrine()->getRepository('OjsJournalBundle:Journal')->find($id);
$this->throw404IfNotFound($entity);
$form = $this->createEditForm($entity);
$form->handleRequest($request);
$entity->getCurrentTranslation()->setLocale($entity->getMandatoryLang()->getCode());
if ($form->isValid()) {
$em->flush();
$this->successFlashBag('successful.update');
return $this->redirectToRoute('ojs_admin_application_journal_edit', ['id' => $id]);
}
return $this->render('OjsAdminBundle:AdminApplication:journal_edit.html.twig', ['entity' => $entity, 'form' => $form->createView()]);
}