public function editAction($id)
{
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
if (!$this->isGranted('EDIT', $journal, 'sections')) {
throw new AccessDeniedException("You are not authorized for edit this journal's section!");
}
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('OjsJournalBundle:Section')->find($id);
if (!$entity) {
throw $this->createNotFoundException('notFound');
}
$editForm = $this->createEditForm($entity);
return $this->render('OjsJournalBundle:Section:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView()));
}