You are here

public function BlockContent::delete in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/block_content/src/Entity/BlockContent.php \Drupal\block_content\Entity\BlockContent::delete()

Deletes an entity permanently.

Throws

\Drupal\Core\Entity\EntityStorageException In case of failures an exception is thrown.

Overrides Entity::delete

File

core/modules/block_content/src/Entity/BlockContent.php, line 141
Contains \Drupal\block_content\Entity\BlockContent.

Class

BlockContent
Defines the custom block entity class.

Namespace

Drupal\block_content\Entity

Code

public function delete() {
  foreach ($this
    ->getInstances() as $instance) {
    $instance
      ->delete();
  }
  parent::delete();
}