public function showAction($id, $articleId)
{
$em = $this->getDoctrine()->getManager();
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
$article = $em->getRepository('OjsJournalBundle:Article')->find($articleId);
$articleAuthor = $em->getRepository('OjsJournalBundle:ArticleAuthor')->find($id);
if (is_null($article) || is_null($articleAuthor) || $articleAuthor->getArticle()->getId() !== $article->getId()) {
$this->throw404IfNotFound($articleAuthor);
}
if (!$this->isGranted('VIEW', $journal, 'articles')) {
throw new AccessDeniedException("You not authorized for this page!");
}
$token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_article_author' . $articleAuthor->getId());
return $this->render('OjsJournalBundle:ArticleAuthor:show.html.twig', array('entity' => $articleAuthor, 'token' => $token));
}