Ojs\JournalBundle\Controller\BoardController::removeMemberAction PHP Метод

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

public removeMemberAction ( $boardId, $id ) : RedirectResponse
$boardId
$id
Результат Symfony\Component\HttpFoundation\RedirectResponse
    public function removeMemberAction($boardId, $id)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('EDIT', $journal, 'boards')) {
            throw new AccessDeniedException("You not authorized for edit this journal's board!");
        }
        $em = $this->getDoctrine()->getManager();
        $boardMember = $em->getRepository('OjsJournalBundle:BoardMember')->find($id);
        $this->throw404IfNotFound($boardMember);
        $this->get('ojs_core.delete.service')->check($boardMember);
        $em->remove($boardMember);
        $em->flush();
        return $this->redirectToRoute('ojs_journal_board_show', ['id' => $boardId, 'journalId' => $journal->getId()]);
    }