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