function EntityOperations::entityDelete
Same name in this branch
- 11.x core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityDelete()
Same name in other branches
- 9 core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityDelete()
- 8.9.x core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityDelete()
- 10 core/modules/content_moderation/src/EntityOperations.php \Drupal\content_moderation\EntityOperations::entityDelete()
Implements hook_entity_delete().
File
-
core/
modules/ workspaces/ src/ Hook/ EntityOperations.php, line 238
Class
- EntityOperations
- Defines a class for reacting to entity runtime hooks.
Namespace
Drupal\workspaces\HookCode
public function entityDelete(EntityInterface $entity) : void {
if ($this->workspaceInfo
->isEntityTypeSupported($entity->getEntityType())) {
$this->workspaceAssociation
->deleteAssociations(NULL, $entity->getEntityTypeId(), [
$entity->id(),
]);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.