/** * Deletes a site * * @ApiDoc( * requirements={ * {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="site id"} * }, * statusCodes={ * 200="Returned when site is successfully deleted", * 400="Returned when an error has occured while deleting the site", * 404="Returned when unable to find the site" * } * ) * * @param integer $id A Site identifier * * @return \FOS\RestBundle\View\View * * @throws NotFoundHttpException */ public function deleteSiteAction($id) { $site = $this->getSite($id); $this->siteManager->delete($site); return array('deleted' => true); }