You are here

public static function VoteType::postDelete in Voting API 8.3

Acts on deleted entities before the delete hook is invoked.

Used after the entities are deleted but before invoking the delete hook.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object.

\Drupal\Core\Entity\EntityInterface[] $entities: An array of entities.

Overrides ConfigEntityBundleBase::postDelete

File

src/Entity/VoteType.php, line 97

Class

VoteType
Defines the Vote type configuration entity.

Namespace

Drupal\votingapi\Entity

Code

public static function postDelete(EntityStorageInterface $storage, array $entities) {
  parent::postDelete($storage, $entities);

  // Clear the vote type cache to reflect the removal.
  $storage
    ->resetCache(array_keys($entities));

  // TODO: needed?
}