public static function Flag::postDelete in Flag 8.4
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/ Flag.php, line 513
Class
- Flag
- Provides the Flag configuration entity.
Namespace
Drupal\flag\EntityCode
public static function postDelete(EntityStorageInterface $storage, array $entities) {
parent::postDelete($storage, $entities);
if (\Drupal::moduleHandler()
->moduleExists('views')) {
// Rebuild views data to invalidate flag relationships.
\Drupal::service('views.views_data')
->clear();
}
\Drupal::service('plugin.manager.action')
->clearCachedDefinitions();
}