// An entity type can be deleted even when its live (in-code) definition has
// been removed from the codebase, so we need to instantiate a custom
// storage handler that uses the passed-in entity type definition.
$storage =
$this->entityTypeManager->
createHandlerInstance($entity_type->
getStorageClass(),
$entity_type);
// @todo Forward this to all interested handlers, not only storage, once
// iterating handlers is possible: https://www.drupal.org/node/2332857.
if ($storage instanceof EntityTypeListenerInterface
) { $storage->
onEntityTypeDelete($entity_type);
} $this->entityLastInstalledSchemaRepository->
deleteLastInstalledDefinition($entity_type_id);
$this->eventDispatcher->
dispatch(new EntityTypeEvent($entity_type), EntityTypeEvents::DELETE
);
$this->
clearCachedDefinitions();
} /**
* {@inheritdoc}
*/
public function onFieldableEntityTypeUpdate(EntityTypeInterface
$entity_type, EntityTypeInterface
$original, array
$field_storage_definitions, array
$original_field_storage_definitions, array &
$sandbox = NULL
) { $entity_type_id =
$entity_type->
id();