You are here

public static function LingotekSync::getTargetStatus in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getTargetStatus()
  2. 7.3 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getTargetStatus()
  3. 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getTargetStatus()
  4. 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getTargetStatus()
3 calls to LingotekSync::getTargetStatus()
LingotekSync::getDownloadableReport in lib/Drupal/lingotek/LingotekSync.php
lingotek_get_and_update_target_progress in ./lingotek.sync.inc
Updates the 'target_sync_status_[lang-code]' field for every target in the lingotek table with the overall progress returned by TMS
lingotek_update_config_progress in ./lingotek.sync.inc
Updates the 'target_sync_status_[lang-code]' field for every target in the lingotek_config_metadata table with the overall progress returned by TMS

File

lib/Drupal/lingotek/LingotekSync.php, line 25
LingotekSync

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getTargetStatus($doc_id, $lingotek_locale) {
  $key = 'target_sync_status_' . $lingotek_locale;
  if ($chunk_id = LingotekConfigChunk::getIdByDocId($doc_id)) {
    return LingotekConfigChunk::getTargetStatusById($chunk_id, $lingotek_locale);
  }
  else {
    list($entity_id, $entity_type) = self::getEntityIdFromDocId($doc_id);
    return lingotek_keystore($entity_type, $entity_id, $key);
  }
  LingotekLog::error('Did not find any local info for Lingotek Doc ID "@id"', array(
    '@id' => $doc_id,
  ));
  return FALSE;
}