You are here

public static function LingotekSync::getAllLocalDocIds in Lingotek Translation 7.6

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getAllLocalDocIds()
  2. 7.3 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getAllLocalDocIds()
  3. 7.4 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getAllLocalDocIds()
  4. 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getAllLocalDocIds()
2 calls to LingotekSync::getAllLocalDocIds()
lingotek_batch_disassociate_content in ./lingotek.batch.inc
Batch Create: Lingotek Disassociate Translations
lingotek_disassociate_all_form_submit in ./lingotek.admin.inc

File

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

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getAllLocalDocIds() {

  // entity-related doc IDs
  $query = db_select('lingotek_entity_metadata', 'l');
  $query
    ->fields('l', array(
    'value',
  ));
  $query
    ->condition('entity_key', 'document_id');
  $query
    ->distinct();
  $result = $query
    ->execute();
  $doc_ids = $result
    ->fetchCol();

  // config-related doc IDs
  $query = db_select('lingotek_config_metadata', 'l')
    ->fields('l', array(
    'value',
  ))
    ->condition('config_key', 'document_id')
    ->distinct();
  $result = $query
    ->execute();
  $doc_ids = array_merge($doc_ids, $result
    ->fetchCol());
  return $doc_ids;
}