You are here

protected function ContentEntityStorageBase::doDelete in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::doDelete()
  2. 10 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::doDelete()

Performs storage-specific entity deletion.

Parameters

\Drupal\Core\Entity\EntityInterface[] $entities: An array of entity objects to delete.

Overrides EntityStorageBase::doDelete

1 method overrides ContentEntityStorageBase::doDelete()
ContentEntityNullStorage::doDelete in core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php
Performs storage-specific entity deletion.

File

core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 740

Class

ContentEntityStorageBase
Base class for content entity storage handlers.

Namespace

Drupal\Core\Entity

Code

protected function doDelete($entities) {

  /** @var \Drupal\Core\Entity\ContentEntityInterface[] $entities */
  foreach ($entities as $entity) {
    $this
      ->invokeFieldMethod('delete', $entity);
  }
  $this
    ->doDeleteFieldItems($entities);
}