BlockContent::delete

public 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 143

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();
}
doc_Drupal
2016-10-29 08:46:43
Comments
Leave a Comment

Please login to continue.