You are here

public function LingotekConfigTranslationService::markConfigTranslationsAsDirty in Lingotek Translation 3.1.x

Same name and namespace in other branches
  1. 8 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  2. 8.2 src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  3. 4.0.x src/LingotekConfigTranslationService.php \Drupal\lingotek\LingotekConfigTranslationService::markConfigTranslationsAsDirty()
  4. 3.0.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

\Drupal\config_translation\ConfigNamesMapper $mapper_id: The mapper which status we want to change.

Return value

\Drupal\config_translation\ConfigNamesMapper

Overrides LingotekConfigTranslationServiceInterface::markConfigTranslationsAsDirty

File

src/LingotekConfigTranslationService.php, line 1613

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_PENDING);
      }
    }
  }
}