public function patchCitationAction(Request $request, $id)
{
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
if (!$this->isGranted('EDIT', $journal, 'articles')) {
throw new AccessDeniedException();
}
try {
$articleCitationHandler = $this->container->get('ojs_api.journal_article_citation.handler');
$journalService = $this->container->get('ojs.journal_service');
$entity = $articleCitationHandler->patch($this->getOr404($id), $request->request->all());
$routeOptions = array('id' => $entity->getId(), 'journalId' => $journalService->getSelectedJournal()->getId(), 'articleId' => $articleCitationHandler->getArticle()->getId(), '_format' => $request->get('_format'));
return $this->routeRedirectView('api_1_article_get_citation', $routeOptions, Codes::HTTP_NO_CONTENT);
} catch (InvalidFormException $exception) {
return $exception->getForm();
}
}