3 namespace Drupal\config_override_test;
5 use Drupal\Core\Cache\CacheableMetadata;
6 use Drupal\Core\Config\ConfigFactoryOverrideInterface;
7 use Drupal\Core\Config\StorageInterface;
10 * Tests module overrides for configuration.
12 class ConfigOverriderLowPriority implements ConfigFactoryOverrideInterface {
17 public function loadOverrides($names) {
19 if (!empty($GLOBALS['config_test_run_module_overrides'])) {
20 if (in_array('system.site', $names)) {
23 'name' => 'Should not apply because of higher priority listener',
24 // This override should apply because it is not overridden by the
25 // higher priority listener.
26 'slogan' => 'Yay for overrides!',
37 public function getCacheSuffix() {
38 return 'ConfigOverriderLowPriority';
44 public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
51 public function getCacheableMetadata($name) {
52 return new CacheableMetadata();