function ConfigNamesMapper::hasTranslation

Same name in other branches
  1. 8.9.x core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::hasTranslation()
  2. 10 core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::hasTranslation()
  3. 11.x core/modules/config_translation/src/ConfigNamesMapper.php \Drupal\config_translation\ConfigNamesMapper::hasTranslation()

Overrides ConfigMapperInterface::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;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.