You are here

public static function CustomFilter::postDelete in Custom filter 2.0.x

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 EntityBase::postDelete

File

src/Entity/CustomFilter.php, line 365

Class

CustomFilter
Defines the entity for a filter in customfilter.

Namespace

Drupal\customfilter\Entity

Code

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

  // Clear the text formats filter discovery when delete.
  \Drupal::service('plugin.manager.filter')
    ->clearCachedDefinitions();
  parent::postDelete($storage, $entities);
}