You are here

public function MyModuleBookResourceController::delete in RESTful Web Services 7.2

Same name and namespace in other branches
  1. 7 restws.api.php \MyModuleBookResourceController::delete()

Overrides RestWSResourceControllerInterface::delete

See also

RestWSResourceControllerInterface::delete()

File

./restws.api.php, line 238
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Class

MyModuleBookResourceController
Example controller class for the mymodule_book resource.

Code

public function delete($id) {
  try {
    mymodule_book_delete($id);
  } catch (Exception $e) {
    throw new RestWSException('Book not found', 404);
  }
}