public function editAction($id, $articleId)
{
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
$this->throw404IfNotFound($journal);
$event = new CitationEditEvent($journal->getId(), $articleId, $id);
$editEvent = $this->get('event_dispatcher')->dispatch(CitationEvents::CITATION_EDIT, $event);
$response = $editEvent->getResponse();
if ($response !== null) {
return $response;
}
if (!$this->isGranted('EDIT', $journal, 'articles')) {
throw new AccessDeniedException("You not authorized for this page!");
}
$em = $this->getDoctrine()->getManager();
$entity = $em->getRepository('OjsJournalBundle:Citation')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Citation entity.');
}
$editForm = $this->createEditForm($entity, $articleId);
return $this->render('OjsJournalBundle:Citation:edit.html.twig', array('entity' => $entity, 'edit_form' => $editForm->createView()));
}