function entity_delete

7.x entity.module entity_delete($entity_type, $id)

Permanently delete the given entity.

In case of failures, an exception is thrown.


$entity_type: The type of the entity.

$id: The uniform identifier of the entity to delete.

Return value

FALSE, if there were no information how to delete the entity.

See also


7 calls to entity_delete()
EntityAPITestCase::testCRUDAPIfunctions in entity/entity.test
Tests CRUD API functions: entity_(create|delete|save)
EntityAPITestCase::testCRUDRevisisions in entity/entity.test
Tests CRUD for entities supporting revisions.
EntityDefaultFeaturesController::revert in entity/
Generates the result for hook_features_revert().
EntityDefaultUIController::applyOperation in entity/includes/
Applies an operation to the given entity.
EntityDrupalWrapper::delete in entity/includes/
Permanently delete the wrapped entity.

... See full list

2 string references to 'entity_delete'
EntityAPITestCase::testExportableHooks in entity/entity.test
Make sure insert() and update() hooks for exportables are invoked.
entity_test_entity_delete in entity/tests/entity_test.module
Implements hook_entity_delete().


entity/entity.module, line 311
Module file for the entity API.


function entity_delete($entity_type, $id) {
  return entity_delete_multiple($entity_type, array($id));