You are here

public static function LingotekSync::getDocIdFromNodeId in Lingotek Translation 7.4

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdFromNodeId()
  2. 7.3 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdFromNodeId()
  3. 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdFromNodeId()
  4. 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdFromNodeId()
2 calls to LingotekSync::getDocIdFromNodeId()
LingotekSync::getTargetsByStatus in lib/Drupal/lingotek/LingotekSync.php
getDocIdTargetsByStatus
lingotek_sync_download_node_target in ./lingotek.batch.inc
Download Batch Worker Function: Download Translated Node Content

File

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

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getDocIdFromNodeId($drupal_node_id) {
  $found = FALSE;
  $query = db_select('lingotek', 'l')
    ->fields('l');
  $query
    ->condition('nid', $drupal_node_id);
  $query
    ->condition('lingokey', 'document_id');
  $result = $query
    ->execute();
  if ($record = $result
    ->fetchAssoc()) {
    $found = $record['lingovalue'];
  }
  return $found;
}