public function showAction($id, $articleId)
{
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
$em = $this->getDoctrine()->getManager();
$article = $em->getRepository('OjsJournalBundle:Article')->find($articleId);
$this->throw404IfNotFound($article);
/** @var ArticleFile $entity */
$entity = $em->getRepository('OjsJournalBundle:ArticleFile')->findOneBy(['article' => $article, 'id' => $id]);
$this->throw404IfNotFound($entity);
if (!$this->isGranted('VIEW', $journal, 'articles')) {
throw new AccessDeniedException("You not authorized for this page!");
}
$type = ArticleFileParams::fileType($entity->getType());
$token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_article_file' . $entity->getId());
return $this->render('OjsJournalBundle:ArticleFile:show.html.twig', ['entity' => $entity, 'type' => $type, 'token' => $token]);
}