You are here

public function DeployServicesClient::delete in Deploy Services Client 7

Performs a DELETE request to delete an entity on the endpoint.

Parameters

EntityMetadataWrapper $entity: The entity object to delete. Construct this by calling entity_metadata_wrapper() on a normal Drupal entity.

Throws

DeployServiceException

File

./deploy_services_client.client.inc, line 198
Defines a Services client class which communicates with Deployment endpoints.

Class

DeployServicesClient
Class which defines a Services client based on a Deployment endpoint.

Code

public function delete(EntityMetadataWrapper $entity) {

  // @todo: We'd like to return something here, but there isn't much point
  //   because it seems that $reponse->data is always empty (regardless of
  //   whether the delete request was successful or not).
  $this
    ->entityRequest($entity, 'DELETE');
}