You are here

public static function LingotekSync::getDocIdsFromNodeIds in Lingotek Translation 7.4

5 calls to LingotekSync::getDocIdsFromNodeIds()
lingotek_admin_profile_form_submit in ./lingotek.admin.inc
lingotek_get_change_workflow_form_submit in ./lingotek.module
lingotek_grid_action_submit in ./lingotek.bulk_grid.inc
Submit function for The Grid's actions The action corresponds to the key of the option selected Often redirects to batch operations or to other pages entirely
lingotek_node_disassociate_form_submit in ./lingotek.page.inc
Submit handler for the lingotek_node_disassociate form.
lingotek_update_target_progress_batch_create in ./lingotek.batch.inc

File

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

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getDocIdsFromNodeIds($drupal_node_ids, $associate = FALSE) {
  $query = db_select('lingotek', 'l')
    ->condition('nid', $drupal_node_ids, 'IN')
    ->condition('lingokey', 'document_id');
  $query
    ->addField('l', 'lingovalue', 'doc_id');
  if ($associate) {
    $query
      ->addField('l', 'nid');
    $result = $query
      ->execute()
      ->fetchAllAssoc('nid');
  }
  else {
    $result = $query
      ->execute()
      ->fetchCol();
  }
  return $result;
}