You are here

public function LingotekConfigTranslationService::getConfigTargetStatuses in Lingotek Translation 8

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

Gets the translation status of a given entity translation for all locales.

Parameters

ConfigNamesMapper $mapper: The entity which status we want to get.

Return value

array The status of the target translations (see Lingotek class constants)

Overrides LingotekConfigTranslationServiceInterface::getConfigTargetStatuses

File

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

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function getConfigTargetStatuses(ConfigNamesMapper $mapper) {
  $status = [];
  $config_names = $mapper
    ->getConfigNames();
  if (!empty($config_names)) {
    $config_name = reset($config_names);
    $metadata = LingotekConfigMetadata::loadByConfigName($config_name);
    $status = $metadata
      ->getTargetStatus();
  }
  return $status;
}