You are here

public function Entity::delete in Entity API 7

Permanently deletes the entity.

Overrides EntityInterface::delete

See also

entity_delete()

File

includes/entity.inc, line 340
Provides a base class for entities.

Class

Entity
A common class for entities.

Code

public function delete() {
  $id = $this
    ->identifier();
  if (isset($id)) {
    entity_get_controller($this->entityType)
      ->delete(array(
      $id,
    ));
  }
}