public function deleteCategoryAction($id)
    {
        $category = $this->getCategory($id);

        $this->categoryManager->delete($category);

        return ['deleted' => true];
    }
public function deleteCategoryAction($id)
    {
        $category = $this->getCategory($id);

        $this->categoryManager->delete($category);

        return ['deleted' => true];
    }
public function deleteCategoryAction ( $ id ) { $ category = $ this -> getCategory ( $ id ) ; $ this -> categoryManager -> delete ( $ category ) ; return [ 'deleted' => true ] ; }
Deletes a category.

@ApiDoc(
requirements={
{"name"="id", "dataType"="integer", "requirement"="\d+", "description"="category identifier"}
},
statusCodes={
200="Returned when category is successfully deleted",
400="Returned when an error has occurred while category deletion",
404="Returned when unable to find category"
}
)

@param int $id A Category identifier

@throws NotFoundHttpException

@return View
Deletes a category .