public function BlockContent::delete in Drupal 9
Same name and namespace in other branches
- 8 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 EntityBase::delete
File
- core/
modules/ block_content/ src/ Entity/ BlockContent.php, line 168
Class
- BlockContent
- Defines the custom block entity class.
Namespace
Drupal\block_content\EntityCode
public function delete() {
foreach ($this
->getInstances() as $instance) {
$instance
->delete();
}
parent::delete();
}