You are here

public function ConfigNamesMapper::hasTranslation in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::hasTranslation()
  2. 9 core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::hasTranslation()

File

core/modules/config_translation/src/ConfigNamesMapper.php, line 467

Class

ConfigNamesMapper
Configuration mapper base implementation.

Namespace

Drupal\config_translation

Code

public function hasTranslation(LanguageInterface $language) {
  foreach ($this
    ->getConfigNames() as $name) {
    if ($this->localeConfigManager
      ->hasTranslation($name, $language
      ->getId())) {
      return TRUE;
    }
  }
  return FALSE;
}