public function showAction(Board $board)
{
$journal = $this->get('ojs.journal_service')->getSelectedJournal();
if (!$this->isGranted('VIEW', $journal, 'boards')) {
throw new AccessDeniedException("You not authorized for view this journal's boards!");
}
$boardMember = new BoardMember();
$addMemberForm = $this->createAddMemberForm($boardMember, $board, $journal);
$token = $this->get('security.csrf.token_manager')->refreshToken('ojs_journal_board' . $board->getId());
$source = new Entity('OjsJournalBundle:BoardMember');
$alias = $source->getTableAlias();
$source->manipulateQuery(function (QueryBuilder $query) use($alias, $board) {
$query->andWhere($alias . '.board = :board')->setParameter('board', $board);
});
$membersGrid = $this->get('grid')->setSource($source);
$gridAction = $this->get('grid_action');
$actionColumn = new ActionsColumn("actions", 'actions');
$rowAction = [];
if ($this->isGranted('EDIT', $journal, 'boards')) {
$rowAction[] = $gridAction->deleteAction('ojs_journal_board_member_remove', ['id', 'journalId' => $journal->getId(), 'boardId' => $board->getId()]);
}
$actionColumn->setRowActions($rowAction);
$membersGrid->addColumn($actionColumn);
return $membersGrid->getGridResponse('OjsJournalBundle:Board:show.html.twig', array('membersGrid' => $membersGrid, 'entity' => $board, 'token' => $token, 'addMemberForm' => $addMemberForm->createView()));
}