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

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

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