Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / lib / Drupal / Core / Config / Entity / ImportableEntityStorageInterface.php
1 <?php
2
3 namespace Drupal\Core\Config\Entity;
4
5 use Drupal\Core\Config\Config;
6
7 /**
8  * Provides an interface for responding to configuration imports.
9  *
10  * When configuration is synchronized between storages, the entity storage must
11  * handle the synchronization of configuration data for its entity.
12  */
13 interface ImportableEntityStorageInterface {
14
15   /**
16    * Creates entities upon synchronizing configuration changes.
17    *
18    * @param string $name
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.
24    */
25   public function importCreate($name, Config $new_config, Config $old_config);
26
27   /**
28    * Updates entities upon synchronizing configuration changes.
29    *
30    * @param string $name
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.
36    *
37    * @throws \Drupal\Core\Config\ConfigImporterException
38    *   Thrown when the config entity that should be updated can not be found.
39    */
40   public function importUpdate($name, Config $new_config, Config $old_config);
41
42   /**
43    * Delete entities upon synchronizing configuration changes.
44    *
45    * @param string $name
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.
51    */
52   public function importDelete($name, Config $new_config, Config $old_config);
53
54   /**
55    * Renames entities upon synchronizing configuration changes.
56    *
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.
63    */
64   public function importRename($old_name, Config $new_config, Config $old_config);
65
66 }