You are here

public function LingotekConfigTranslationService::markConfigTranslationsAsDirty in Lingotek Translation 8

Same name and namespace in other branches
  1. 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  2. 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  3. 3.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  4. 3.1.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  5. 3.2.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  6. 3.3.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  7. 3.4.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  8. 3.5.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  9. 3.6.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  10. 3.7.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  11. 3.8.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()

Marks the translation status as dirty if they exist.

Parameters

ConfigNamesMapper $mapper: The mapper which status we want to change.

Return value

ConfigNamesMapper

Overrides LingotekConfigTranslationServiceInterface::markConfigTranslationsAsDirty

File

src/LingotekConfigTranslationService.php, line 1035
Contains \Drupal\lingotek\LingotekConfigTranslationService.

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function markConfigTranslationsAsDirty(ConfigNamesMapper $mapper) {
  $target_languages = $this->languageManager
    ->getLanguages();
  $source_langcode = $mapper
    ->getLangcode();
  foreach ($target_languages as $langcode => $language) {
    if ($langcode != $source_langcode && ($current_status = $this
      ->getConfigTargetStatus($mapper, $langcode))) {
      if ($current_status == Lingotek::STATUS_CURRENT) {
        $this
          ->setConfigTargetStatus($mapper, $langcode, Lingotek::STATUS_EDITED);
      }
    }
  }
}