3 namespace Drupal\Core\Config;
6 * Defines the interface for a configuration factory override object.
8 interface ConfigFactoryOverrideInterface {
11 * Returns config overrides.
14 * A list of configuration names that are being loaded.
17 * An array keyed by configuration name of override data. Override data
18 * contains a nested array structure of overrides.
20 public function loadOverrides($names);
23 * The string to append to the configuration static cache name.
26 * A string to append to the configuration static cache name.
28 public function getCacheSuffix();
31 * Creates a configuration object for use during install and synchronization.
33 * If the overrider stores its overrides in configuration collections then
34 * it can have its own implementation of
35 * \Drupal\Core\Config\StorableConfigBase. Configuration overriders can link
36 * themselves to a configuration collection by listening to the
37 * \Drupal\Core\Config\ConfigEvents::COLLECTION_INFO event and adding the
38 * collections they are responsible for. Doing this will allow installation
39 * and synchronization to use the overrider's implementation of
42 * @see \Drupal\Core\Config\ConfigCollectionInfo
43 * @see \Drupal\Core\Config\ConfigImporter::importConfig()
44 * @see \Drupal\Core\Config\ConfigInstaller::createConfiguration()
47 * The configuration object name.
48 * @param string $collection
49 * The configuration collection.
51 * @return \Drupal\Core\Config\StorableConfigBase
52 * The configuration object for the provided name and collection.
54 public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION);
57 * Gets the cacheability metadata associated with the config factory override.
60 * The name of the configuration override to get metadata for.
62 * @return \Drupal\Core\Cache\CacheableMetadata
63 * A cacheable metadata object.
65 public function getCacheableMetadata($name);