Ojs\JournalBundle\Controller\BlockController::showAction PHP Method

showAction() public method

public showAction ( Block $entity ) : Response
$entity Ojs\JournalBundle\Entity\Block
return Symfony\Component\HttpFoundation\Response
    public function showAction(Block $entity)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('VIEW', $journal, 'block')) {
            throw new AccessDeniedException("You not authorized for view this page!");
        }
        $token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_block' . $entity->getId());
        return $this->render('OjsJournalBundle:Block:show.html.twig', array('entity' => $entity, 'token' => $token));
    }