Security update for Core, with self-updated composer
[yaffs-website] / web / core / lib / Drupal / Core / Config / ConfigFactoryOverrideInterface.php
1 <?php
2
3 namespace Drupal\Core\Config;
4
5 /**
6  * Defines the interface for a configuration factory override object.
7  */
8 interface ConfigFactoryOverrideInterface {
9
10   /**
11    * Returns config overrides.
12    *
13    * @param array $names
14    *   A list of configuration names that are being loaded.
15    *
16    * @return array
17    *   An array keyed by configuration name of override data. Override data
18    *   contains a nested array structure of overrides.
19    */
20   public function loadOverrides($names);
21
22   /**
23    * The string to append to the configuration static cache name.
24    *
25    * @return string
26    *   A string to append to the configuration static cache name.
27    */
28   public function getCacheSuffix();
29
30   /**
31    * Creates a configuration object for use during install and synchronization.
32    *
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
40    * StorableConfigBase.
41    *
42    * @see \Drupal\Core\Config\ConfigCollectionInfo
43    * @see \Drupal\Core\Config\ConfigImporter::importConfig()
44    * @see \Drupal\Core\Config\ConfigInstaller::createConfiguration()
45    *
46    * @param string $name
47    *   The configuration object name.
48    * @param string $collection
49    *   The configuration collection.
50    *
51    * @return \Drupal\Core\Config\StorableConfigBase
52    *   The configuration object for the provided name and collection.
53    */
54   public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION);
55
56   /**
57    * Gets the cacheability metadata associated with the config factory override.
58    *
59    * @param string $name
60    *   The name of the configuration override to get metadata for.
61    *
62    * @return \Drupal\Core\Cache\CacheableMetadata
63    *   A cacheable metadata object.
64    */
65   public function getCacheableMetadata($name);
66
67 }