コード例 #1
0
ファイル: CarController.php プロジェクト: ibrows/rest-bundle
 /**
  * @ApiDoc(
  *     section="Car",
  *     description="Link Resources",
  * )
  *
  * @FOSRest\Unlink(path="/{car}")
  *
  * @param Car $car
  * @ParamConverter(
  *     "car",
  *     converter="unlink",
  *     class="IbrowsAppBundle:Car",
  *     options = {
  *         "source" = "doctrine.orm",
  *         "relations" = { "categories" }
  *     }
  * )
  *
  * @IbrowsAPI\View(
  *     statusCode=204,
  * )
  */
 public function unlinkAction(Car $car)
 {
     $this->carHandler->update($car);
 }
コード例 #2
0
 /**
  * @ApiDoc(
  *     section="Car",
  *     description="Delete a car wheel"
  * )
  *
  * @FOSRest\Delete("/wheels/{wheel}")
  *
  * @param Wheel $wheel
  *
  * @ParamConverter(name="wheel", converter="doctrine.orm", class="IbrowsAppBundle:Wheel")
  *
  * @IbrowsAPI\View(
  *     statusCode=204
  * )
  */
 public function removeAction(Wheel $wheel)
 {
     $this->carHandler->removeWheel($wheel);
 }