You are here

public static function LingotekSync::getDocIdFromNodeId in Lingotek Translation 7.3

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdFromNodeId()
  2. 7.4 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()
1 call to LingotekSync::getDocIdFromNodeId()
lingotek_node_content_reset_form_submit in ./lingotek.page.inc
Submit handler for the lingotek_node_content_reset form.

File

lib/Drupal/lingotek/LingotekSync.php, line 618
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;
}