You are here

public function FieldConfigStorage::importDelete in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/field/src/FieldConfigStorage.php \Drupal\field\FieldConfigStorage::importDelete()

Delete entities upon synchronizing configuration changes.

Parameters

string $name: The name of the configuration object.

\Drupal\Core\Config\Config $new_config: A configuration object containing the new configuration data.

\Drupal\Core\Config\Config $old_config: A configuration object containing the old configuration data.

Overrides ConfigEntityStorage::importDelete

File

core/modules/field/src/FieldConfigStorage.php, line 89

Class

FieldConfigStorage
Storage handler for field config.

Namespace

Drupal\field

Code

public function importDelete($name, Config $new_config, Config $old_config) {

  // If the field storage has been deleted in the same import, the field will
  // be deleted by then, and there is nothing left to do. Just return TRUE so
  // that the file does not get written to active store.
  if (!$old_config
    ->get()) {
    return TRUE;
  }
  return parent::importDelete($name, $new_config, $old_config);
}