public function updateAction(Request $request, Period $entity)
{
$em = $this->getDoctrine()->getManager();
$this->throw404IfNotFound($entity);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
if ($editForm->isValid()) {
$em->flush();
$this->successFlashBag('successful.update');
return $this->redirectToRoute('ojs_admin_period_edit', ['id' => $entity->getId()]);
}
return $this->render('OjsAdminBundle:AdminPeriod:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView()));
}