ConfigOverrider.php in Drupal 8
File
core/modules/config/tests/config_entity_static_cache_test/src/ConfigOverrider.php
View source
<?php
namespace Drupal\config_entity_static_cache_test;
use Drupal\Core\Cache\CacheableMetadata;
use Drupal\Core\Config\ConfigFactoryOverrideInterface;
use Drupal\Core\Config\StorageInterface;
class ConfigOverrider implements ConfigFactoryOverrideInterface {
public function loadOverrides($names) {
return [
'config_test.dynamic.test_1' => [
'label' => 'Overridden label',
],
];
}
public function getCacheSuffix() {
return 'config_entity_static_cache_test';
}
public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
return NULL;
}
public function getCacheableMetadata($name) {
return new CacheableMetadata();
}
}