/** * Deletes a collection * * @ApiDoc( * requirements={ * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="collection identifier"} * }, * statusCodes={ * 200="Returned when collection is successfully deleted", * 400="Returned when an error has occurred while collection deletion", * 404="Returned when unable to find collection" * } * ) * * @param integer $id A Collection identifier * * @return \FOS\RestBundle\View\View * * @throws NotFoundHttpException */ public function deleteCollectionAction($id) { $collection = $this->getCollection($id); $this->collectionManager->delete($collection); return array('deleted' => true); }