public function updateAction(Request $request, $publisherId, PublisherTheme $entity)
{
$em = $this->getDoctrine()->getManager();
$publisher = $em->getRepository('OjsJournalBundle:Publisher')->find($publisherId);
$this->throw404IfNotFound($publisher);
if (!$this->isGrantedForPublisher($publisher)) {
throw new AccessDeniedException("You are not authorized for this page!");
}
$editForm = $this->createEditForm($entity, $publisher);
$editForm->handleRequest($request);
if ($editForm->isValid()) {
$entity->setPublisher($publisher);
$em->flush();
$this->successFlashBag('successful.update');
return $this->redirectToRoute('ojs_publisher_manager_theme_edit', ['publisherId' => $publisherId, 'id' => $entity->getId()]);
}
return $this->render('OjsJournalBundle:ManagerPublisherTheme:edit.html.twig', array('entity' => $entity, 'publisher' => $publisher, 'edit_form' => $editForm->createView()));
}