3 namespace Drupal\Core\Config\Entity;
5 use Drupal\Core\Entity\EntityStorageInterface;
8 * Provides an interface for configuration entity storage.
10 interface ConfigEntityStorageInterface extends EntityStorageInterface {
13 * Extracts the configuration entity ID from the full configuration name.
15 * @param string $config_name
16 * The full configuration name to extract the ID from; for example,
17 * 'views.view.archive'.
18 * @param string $config_prefix
19 * The config prefix of the configuration entity; for example, 'views.view'.
22 * The ID of the configuration entity.
24 public static function getIDFromConfigName($config_name, $config_prefix);
27 * Creates a configuration entity from storage values.
29 * Allows the configuration entity storage to massage storage values before
32 * @param array $values
33 * The array of values from the configuration storage.
35 * @return ConfigEntityInterface
36 * The configuration entity.
38 * @see \Drupal\Core\Entity\EntityStorageBase::mapFromStorageRecords()
39 * @see \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords()
41 public function createFromStorageRecord(array $values);
44 * Updates a configuration entity from storage values.
46 * Allows the configuration entity storage to massage storage values before
49 * @param ConfigEntityInterface $entity
50 * The configuration entity to update.
51 * @param array $values
52 * The array of values from the configuration storage.
54 * @return ConfigEntityInterface
55 * The configuration entity.
57 * @see \Drupal\Core\Entity\EntityStorageBase::mapFromStorageRecords()
58 * @see \Drupal\field\FieldStorageConfigStorage::mapFromStorageRecords()
60 public function updateFromStorageRecord(ConfigEntityInterface $entity, array $values);
63 * Loads one entity in their original form without overrides.
66 * The ID of the entity to load.
68 * @return \Drupal\Core\Entity\EntityInterface|null
69 * An entity object. NULL if no matching entity is found.
71 public function loadOverrideFree($id);
74 * Loads one or more entities in their original form without overrides.
77 * An array of entity IDs, or NULL to load all entities.
79 * @return \Drupal\Core\Entity\EntityInterface[]
80 * An array of entity objects indexed by their IDs. Returns an empty array
81 * if no matching entities are found.
83 public function loadMultipleOverrideFree(array $ids = NULL);