Ojs\ApiBundle\Controller\Admin\AnnouncementRestController::deleteAnnouncementAction PHP Method

deleteAnnouncementAction() public method

public deleteAnnouncementAction ( $id ) : FOS\RestBundle\Controller\Annotations\View
$id
return FOS\RestBundle\Controller\Annotations\View
    public function deleteAnnouncementAction($id)
    {
        $entity = $this->getOr404($id);
        if (!$this->isGranted('DELETE', $entity)) {
            throw new AccessDeniedException();
        }
        $this->container->get('ojs_api.announcement.handler')->delete($entity);
        return $this->view(null, Codes::HTTP_NO_CONTENT, []);
    }