8d21ee4e832ddac86055abce6acee89e69517012
[yaffs-website] / web / core / modules / config / tests / config_entity_static_cache_test / src / ConfigOverrider.php
1 <?php
2
3 namespace Drupal\config_entity_static_cache_test;
4
5 use Drupal\Core\Cache\CacheableMetadata;
6 use Drupal\Core\Config\ConfigFactoryOverrideInterface;
7 use Drupal\Core\Config\StorageInterface;
8
9 /**
10  * Tests module overrides for configuration.
11  */
12 class ConfigOverrider implements ConfigFactoryOverrideInterface {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function loadOverrides($names) {
18     return [
19       'config_test.dynamic.test_1' => [
20         'label' => 'Overridden label',
21       ]
22     ];
23   }
24
25   /**
26    * {@inheritdoc}
27    */
28   public function getCacheSuffix() {
29     return 'config_entity_static_cache_test';
30   }
31
32   /**
33    * {@inheritdoc}
34    */
35   public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
36     return NULL;
37   }
38
39   /**
40    * {@inheritdoc}
41    */
42   public function getCacheableMetadata($name) {
43     return new CacheableMetadata();
44   }
45
46 }