/** * {@inheritdoc} */ protected function getConfigNamesToDelete(ConfigEntityInterface $entity) { /** @var \Drupal\field\FieldStorageConfigInterface $field_storage */ $field_storage = $entity->getFieldStorageDefinition(); $config_names = [$entity->getConfigDependencyName()]; // If there is only one bundle left for this field storage, it will be // deleted too, notify the user about dependencies. if (count($field_storage->getBundles()) <= 1) { $config_names[] = $field_storage->getConfigDependencyName(); } return $config_names; }