class ConfigOverriderLowPriority
Tests module overrides for configuration.
Hierarchy
- class \Drupal\config_override_test\ConfigOverriderLowPriority implements \Drupal\Core\Config\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
| Title Sort descending | Modifiers | Object type | Summary | Overriden Title | 
|---|---|---|---|---|
| ConfigOverriderLowPriority::createConfigObject | public | function | Creates a configuration object for use during install and synchronization. | Overrides ConfigFactoryOverrideInterface::createConfigObject | 
| ConfigOverriderLowPriority::getCacheableMetadata | public | function | Gets the cacheability metadata associated with the config factory override. | Overrides ConfigFactoryOverrideInterface::getCacheableMetadata | 
| ConfigOverriderLowPriority::getCacheSuffix | public | function | The string to append to the configuration static cache name. | Overrides ConfigFactoryOverrideInterface::getCacheSuffix | 
| ConfigOverriderLowPriority::loadOverrides | public | function | Returns config overrides. | Overrides ConfigFactoryOverrideInterface::loadOverrides | 
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.