public function showAction(Request $request, $id)
{
$em = $this->getDoctrine()->getManager();
/** @var IssueFile $entity */
$entity = $em->getRepository('OjsJournalBundle:IssueFile')->find($id);
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
if (!$this->isGranted('VIEW', $journal, 'issues')) {
throw new AccessDeniedException('You are not authorized for edit this issue file!');
}
/** @var Issue $issue */
$issue = $em->getRepository('OjsJournalBundle:Issue')->find($entity->getIssue()->getId());
$this->throw404IfNotFound($issue);
$this->throw404IfNotFound($entity);
$entity->setDefaultLocale($request->getDefaultLocale());
$token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_issue_file' . $entity->getId());
return $this->render('OjsJournalBundle:IssueFile:show.html.twig', array('entity' => $entity, 'token' => $token));
}