public function FieldInstanceStorageController::importDelete

Delete configuration upon synchronizing configuration changes.

This callback is invoked when configuration is synchronized between storages and allows a module to take over the synchronization of configuration data.

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 ConfigStorageController::importDelete

File

drupal/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php, line 93
Contains \Drupal\field\FieldInstanceStorageController.

Class

FieldInstanceStorageController
Controller class for field instances.

Namespace

Drupal\field

Code

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

  // If the field has been deleted in the same import, the instance 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);
}