class ConfigOverriderLowPriority in Drupal 8
Same name and namespace in other branches
- 9 core/modules/config/tests/config_override_test/src/ConfigOverriderLowPriority.php \Drupal\config_override_test\ConfigOverriderLowPriority
Tests module overrides for configuration.
Hierarchy
- class \Drupal\config_override_test\ConfigOverriderLowPriority implements ConfigFactoryOverrideInterface
Expanded class hierarchy of ConfigOverriderLowPriority
2 string references to 'ConfigOverriderLowPriority'
- ConfigOverriderLowPriority::getCacheSuffix in core/
modules/ config/ tests/ config_override_test/ src/ ConfigOverriderLowPriority.php - The string to append to the configuration static cache name.
- config_override_test.services.yml in core/
modules/ config/ tests/ config_override_test/ config_override_test.services.yml - core/modules/config/tests/config_override_test/config_override_test.services.yml
1 service uses ConfigOverriderLowPriority
- config_override_test.low_priority_overrider in core/
modules/ config/ tests/ config_override_test/ config_override_test.services.yml - Drupal\config_override_test\ConfigOverriderLowPriority
File
- core/
modules/ config/ tests/ config_override_test/ src/ ConfigOverriderLowPriority.php, line 12
Namespace
Drupal\config_override_testView source
class ConfigOverriderLowPriority implements ConfigFactoryOverrideInterface {
/**
* {@inheritdoc}
*/
public function loadOverrides($names) {
$overrides = [];
if (!empty($GLOBALS['config_test_run_module_overrides'])) {
if (in_array('system.site', $names)) {
$overrides = [
'system.site' => [
'name' => 'Should not apply because of higher priority listener',
// This override should apply because it is not overridden by the
// higher priority listener.
'slogan' => 'Yay for overrides!',
],
];
}
}
return $overrides;
}
/**
* {@inheritdoc}
*/
public function getCacheSuffix() {
return 'ConfigOverriderLowPriority';
}
/**
* {@inheritdoc}
*/
public function createConfigObject($name, $collection = StorageInterface::DEFAULT_COLLECTION) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function getCacheableMetadata($name) {
return new CacheableMetadata();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigOverriderLowPriority:: |
public | function |
Creates a configuration object for use during install and synchronization. Overrides ConfigFactoryOverrideInterface:: |
|
ConfigOverriderLowPriority:: |
public | function |
Gets the cacheability metadata associated with the config factory override. Overrides ConfigFactoryOverrideInterface:: |
|
ConfigOverriderLowPriority:: |
public | function |
The string to append to the configuration static cache name. Overrides ConfigFactoryOverrideInterface:: |
|
ConfigOverriderLowPriority:: |
public | function |
Returns config overrides. Overrides ConfigFactoryOverrideInterface:: |