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

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

Finds and displays a Section entity.
public showAction ( Request $request, Ojs\JournalBundle\Entity\Section $entity ) : Response
$request Symfony\Component\HttpFoundation\Request
$entity Ojs\JournalBundle\Entity\Section
Результат Symfony\Component\HttpFoundation\Response
    public function showAction(Request $request, Section $entity)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('VIEW', $journal, 'sections')) {
            throw new AccessDeniedException("You are not authorized for view this journal's section!");
        }
        if (!$entity) {
            throw $this->createNotFoundException('notFound');
        }
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_section' . $entity->getId());
        return $this->render('OjsJournalBundle:Section:show.html.twig', array('entity' => $entity, 'token' => $token));
    }