Ojs\JournalBundle\Controller\BlockController::indexAction PHP Метод

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

Lists all Block entities.
public indexAction ( )
    public function indexAction()
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('VIEW', $journal, 'block')) {
            throw new AccessDeniedException("You not authorized for view this journal's blocks!");
        }
        $source = new Entity('OjsJournalBundle:Block');
        $grid = $this->get('grid')->setSource($source);
        $gridAction = $this->get('grid_action');
        $actionColumn = new ActionsColumn("actions", 'actions');
        $rowAction[] = $gridAction->showAction('ojs_journal_block_show', ['id', 'journalId' => $journal->getId()]);
        $rowAction[] = $gridAction->editAction('ojs_journal_block_edit', ['id', 'journalId' => $journal->getId()]);
        $rowAction[] = $gridAction->deleteAction('ojs_journal_block_delete', ['id', 'journalId' => $journal->getId()]);
        $actionColumn->setRowActions($rowAction);
        $grid->addColumn($actionColumn);
        return $grid->getGridResponse('OjsJournalBundle:Block:index.html.twig');
    }