You are here

public function ContentTranslationConfigOverrideBase::getCacheableMetadata in Open Social 8.8

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  2. 8.4 modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  3. 8.5 modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  4. 8.6 modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  5. 8.7 modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  6. 10.3.x modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  7. 10.0.x modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  8. 10.1.x modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()
  9. 10.2.x modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php \Drupal\social_core\ContentTranslationConfigOverrideBase::getCacheableMetadata()

Gets the cacheability metadata associated with the config factory override.

Parameters

string $name: The name of the configuration override to get metadata for.

Return value

\Drupal\Core\Cache\CacheableMetadata A cacheable metadata object.

Overrides ConfigFactoryOverrideInterface::getCacheableMetadata

File

modules/social_features/social_core/src/ContentTranslationConfigOverrideBase.php, line 95

Class

ContentTranslationConfigOverrideBase
Provides a base class for configurable content translation config overrides.

Namespace

Drupal\social_core

Code

public function getCacheableMetadata($name) {
  $metadata = new CacheableMetadata();
  if (in_array($name, $this
    ->getOverriddenConfigurations())) {
    $metadata
      ->addCacheTags([
      'config:social_content_translation.settings',
    ]);
  }
  return $metadata;
}