public function Entity::delete

Implements \Drupal\Core\Entity\EntityInterface::delete().

Overrides EntityInterface::delete

3 calls to Entity::delete()
CustomBlock::delete in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php
Implements \Drupal\Core\Entity\EntityInterface::delete().
Field::delete in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
Implements \Drupal\Core\Entity\EntityInterface::delete().
FieldInstance::delete in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
Overrides \Drupal\Core\Entity\Entity::delete().
3 methods override Entity::delete()
CustomBlock::delete in drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php
Implements \Drupal\Core\Entity\EntityInterface::delete().
Field::delete in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
Implements \Drupal\Core\Entity\EntityInterface::delete().
FieldInstance::delete in drupal/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
Overrides \Drupal\Core\Entity\Entity::delete().

File

drupal/core/lib/Drupal/Core/Entity/Entity.php, line 355
Contains \Drupal\Core\Entity\Entity.

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public function delete() {
  if (!$this
    ->isNew()) {
    \Drupal::entityManager()
      ->getStorageController($this->entityType)
      ->delete(array(
      $this
        ->id() => $this,
    ));
  }
}