Ojs\ApiBundle\Controller\Journal\JournalSectionRestController::deleteSectionAction PHP Method

deleteSectionAction() public method

public deleteSectionAction ( $id ) : Response
$id
return Response
    public function deleteSectionAction($id)
    {
        $journal = $this->get('ojs.journal_service')->getSelectedJournal();
        if (!$this->isGranted('DELETE', $journal, 'sections')) {
            throw new AccessDeniedException();
        }
        $entity = $this->getOr404($id);
        $this->container->get('ojs_api.journal_section.handler')->delete($entity);
        return $this->view(null, Codes::HTTP_NO_CONTENT, []);
    }