You are here

public static function LingotekSync::getTargetStatus in Lingotek Translation 7.4

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.5 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_progress_[lang-code]' field for every target in the lingotek table with the overall progress returned by TMS
lingotek_sync_download_node_target in ./lingotek.batch.inc
Download Batch Worker Function: Download Translated Node Content

File

lib/Drupal/lingotek/LingotekSync.php, line 35
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 {
    $node_id = self::getNodeIdFromDocId($doc_id);
    return lingotek_lingonode($node_id, $key);
  }
  LingotekLog::error('Did not find a node or chunk for Doc ID "@id"', array(
    '@id' => $doc_id,
  ));
  return FALSE;
}