public function Entity::delete

Implements EntityInterface::delete().

Overrides EntityInterface::delete

File

drupal/core/lib/Drupal/Core/Entity/Entity.php, line 328
Definition of Drupal\Core\Entity\Entity.

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

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