3 namespace Drupal\Core\Config\Entity;
5 use Drupal\Core\Config\Config;
8 * Provides an interface for responding to configuration imports.
10 * When configuration is synchronized between storages, the entity storage must
11 * handle the synchronization of configuration data for its entity.
13 interface ImportableEntityStorageInterface {
16 * Creates entities upon synchronizing configuration changes.
19 * The name of the configuration object.
20 * @param \Drupal\Core\Config\Config $new_config
21 * A configuration object containing the new configuration data.
22 * @param \Drupal\Core\Config\Config $old_config
23 * A configuration object containing the old configuration data.
25 public function importCreate($name, Config $new_config, Config $old_config);
28 * Updates entities upon synchronizing configuration changes.
31 * The name of the configuration object.
32 * @param \Drupal\Core\Config\Config $new_config
33 * A configuration object containing the new configuration data.
34 * @param \Drupal\Core\Config\Config $old_config
35 * A configuration object containing the old configuration data.
37 * @throws \Drupal\Core\Config\ConfigImporterException
38 * Thrown when the config entity that should be updated can not be found.
40 public function importUpdate($name, Config $new_config, Config $old_config);
43 * Delete entities upon synchronizing configuration changes.
46 * The name of the configuration object.
47 * @param \Drupal\Core\Config\Config $new_config
48 * A configuration object containing the new configuration data.
49 * @param \Drupal\Core\Config\Config $old_config
50 * A configuration object containing the old configuration data.
52 public function importDelete($name, Config $new_config, Config $old_config);
55 * Renames entities upon synchronizing configuration changes.
57 * @param string $old_name
58 * The original name of the configuration object.
59 * @param \Drupal\Core\Config\Config $new_config
60 * A configuration object containing the new configuration data.
61 * @param \Drupal\Core\Config\Config $old_config
62 * A configuration object containing the old configuration data.
64 public function importRename($old_name, Config $new_config, Config $old_config);