コード例 #1
0
 /**
  * Deletes a block.
  *
  * @ApiDoc(
  *  requirements={
  *      {"name"="id", "dataType"="integer", "requirement"="\d+", "description"="block identifier"}
  *  },
  *  statusCodes={
  *      200="Returned when block is successfully deleted",
  *      400="Returned when an error has occurred while block deletion",
  *      404="Returned when unable to find block"
  *  }
  * )
  *
  * @param int $id A Block identifier
  *
  * @return \FOS\RestBundle\View\View
  *
  * @throws NotFoundHttpException
  */
 public function deleteBlockAction($id)
 {
     $block = $this->getBlock($id);
     $this->blockManager->delete($block);
     return array('deleted' => true);
 }