public function deleteAction(AnnouncementAggregate $aggregate, Announcement $announcement)
    {
        $this->checkPermission('EDIT', $aggregate->getResourceNode(), [], true);

        $this->crud->delete($announcement, ['announcement_aggregate' => $aggregate]);

        return new JsonResponse(null, 204);
    }
public function deleteAction(AnnouncementAggregate $aggregate, Announcement $announcement)
    {
        $this->checkPermission('EDIT', $aggregate->getResourceNode(), [], true);

        $this->crud->delete($announcement, ['announcement_aggregate' => $aggregate]);

        return new JsonResponse(null, 204);
    }
public function deleteAction ( AnnouncementAggregate $ aggregate , Announcement $ announcement ) { $ this -> checkPermission ( 'EDIT' , $ aggregate -> getResourceNode ( ) , [ ] , true ) ; $ this -> crud -> delete ( $ announcement , [ 'announcement_aggregate' => $ aggregate ] ) ; return new JsonResponse ( null , 204 ) ; }
Deletes an announce.

@EXT\Route("/{id}", name="claro_announcement_delete")
@EXT\Method("DELETE")
@EXT\ParamConverter(
"announcement",
class="ClarolineAnnouncementBundle:Announcement",
options={"mapping": {"id": "uuid"}}
)

@param AnnouncementAggregate $aggregate
@param Announcement          $announcement

@return JsonResponse
Deletes an announce .