public function GlobalReferenceManager::onEntityDelete in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 src/Service/GlobalReferenceManager.php \Drupal\content_synchronizer\Service\GlobalReferenceManager::onEntityDelete()
- 3.x src/Service/GlobalReferenceManager.php \Drupal\content_synchronizer\Service\GlobalReferenceManager::onEntityDelete()
Delete the gid on entity deletion.
File
- src/
Service/ GlobalReferenceManager.php, line 145
Class
- GlobalReferenceManager
- The global reference manager.
Namespace
Drupal\content_synchronizer\ServiceCode
public function onEntityDelete(Entity $entity) {
\Drupal::database()
->delete(self::GID_TABLE_NAME)
->condition(self::FIELD_ENTITY_ID, $entity
->id())
->condition(self::FIELD_ENTITY_TYPE, $entity
->getEntityTypeId())
->execute();
}