public function LingotekContentTranslationService::getTargetStatus in Lingotek Translation 3.6.x
Same name and namespace in other branches
- 8 src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 8.2 src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 4.0.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.0.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.1.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.2.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.3.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.4.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.5.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.7.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
- 3.8.x src/LingotekContentTranslationService.php \Drupal\lingotek\LingotekContentTranslationService::getTargetStatus()
Gets the translation status of a given entity translation for a locale.
Parameters
\Drupal\Core\Entity\ContentEntityInterface &$entity: The entity which status we want to get.
string $locale: Lingotek translation language which we want to get.
Return value
int The status of the target translation (see Lingotek class constants)
Overrides LingotekContentTranslationServiceInterface::getTargetStatus
7 calls to LingotekContentTranslationService::getTargetStatus()
- LingotekContentTranslationService::addTarget in src/
LingotekContentTranslationService.php - Request a translation for a given entity in the given locale.
- LingotekContentTranslationService::checkTargetStatus in src/
LingotekContentTranslationService.php - Gets the current status of the target translation.
- LingotekContentTranslationService::checkTargetStatuses in src/
LingotekContentTranslationService.php - Gets the current status of all the target translations.
- LingotekContentTranslationService::getSourceStatus in src/
LingotekContentTranslationService.php - Gets the source status of the given entity.
- LingotekContentTranslationService::markTranslationsAsDirty in src/
LingotekContentTranslationService.php - Marks the translation status as dirty if they exist.
File
- src/
LingotekContentTranslationService.php, line 351
Class
- LingotekContentTranslationService
- Service for managing Lingotek content translations.
Namespace
Drupal\lingotekCode
public function getTargetStatus(ContentEntityInterface &$entity, $langcode) {
$status = Lingotek::STATUS_UNTRACKED;
$statuses = $this
->getTargetStatuses($entity);
if (isset($statuses[$langcode])) {
$status = $statuses[$langcode];
}
return $status;
}