You are here

function entity_usage_field_storage_config_delete in Entity Usage 8.2

Same name and namespace in other branches
  1. 8.4 entity_usage.module \entity_usage_field_storage_config_delete()
  2. 8.3 entity_usage.module \entity_usage_field_storage_config_delete()

Implements hook_ENTITY_TYPE_delete().

File

./entity_usage.module, line 68
Contains entity_usage.module.

Code

function entity_usage_field_storage_config_delete(FieldStorageConfigInterface $field) {

  // Delete all usages tracked through this field.
  \Drupal::service('entity_usage.usage')
    ->deleteByField($field
    ->getTargetEntityTypeId(), $field
    ->getName());
}