You are here

public function TermStorage::delete in Multiversion 8

Same name and namespace in other branches
  1. 8.2 src/Entity/Storage/Sql/TermStorage.php \Drupal\multiversion\Entity\Storage\Sql\TermStorage::delete()

Deletes permanently saved entities.

Parameters

array $entities: An array of entity objects to delete.

Throws

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

Overrides SqlContentEntityStorage::delete

File

src/Entity/Storage/Sql/TermStorage.php, line 137

Class

TermStorage
Storage handler for taxonomy terms.

Namespace

Drupal\multiversion\Entity\Storage\Sql

Code

public function delete(array $entities) {
  $this
    ->deleteEntities($entities);
  foreach ($entities as $entity) {
    $this
      ->updateParentHierarchy([
      $entity
        ->id(),
    ]);
  }
}