public static function CustomFilter::preDelete in Custom filter 2.0.x
Acts on entities before they are deleted and before hooks are invoked.
Used before the entities are deleted and 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 ConfigEntityBase::preDelete
File
- src/
Entity/ CustomFilter.php, line 357
Class
- CustomFilter
- Defines the entity for a filter in customfilter.
Namespace
Drupal\customfilter\EntityCode
public static function preDelete(EntityStorageInterface $storage, array $entities) {
\Drupal::service('customfilter.validator')
->clearFilters($entities);
parent::preDelete($storage, $entities);
}