function workspaces_entity_predelete in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workspaces/workspaces.module \workspaces_entity_predelete()
Implements hook_entity_predelete().
File
- core/
modules/ workspaces/ workspaces.module, line 136 - Provides full-site preview functionality for content staging.
Code
function workspaces_entity_predelete(EntityInterface $entity) {
if ($entity
->getEntityTypeId() === 'workspace') {
\Drupal::service('workspaces.repository')
->resetCache();
}
return \Drupal::service('class_resolver')
->getInstanceFromDefinition(EntityOperations::class)
->entityPredelete($entity);
}