Ojs\JournalBundle\Controller\IssueFileController::showAction PHP Метод

showAction() публичный Метод

Finds and displays a IssueFile entity.
public showAction ( Request $request, $id ) : Response
$request Symfony\Component\HttpFoundation\Request
$id
Результат Symfony\Component\HttpFoundation\Response
    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));
    }