You are here

public function LingotekConfigTranslationService::getTargetStatuses in Lingotek Translation 8

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

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

Parameters

ConfigEntityInterface &$entity: The entity which statuses we want to get.

Return value

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

Overrides LingotekConfigTranslationServiceInterface::getTargetStatuses

File

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

Class

LingotekConfigTranslationService
Service for managing Lingotek configuration translations.

Namespace

Drupal\lingotek

Code

public function getTargetStatuses(ConfigEntityInterface &$entity) {
  $metadata = LingotekConfigMetadata::loadByConfigName($entity
    ->getEntityTypeId() . '.' . $entity
    ->id());
  $translation_status = $metadata
    ->getTargetStatus();
  return $translation_status;
}