You are here

public static function LingotekSync::getConfigDocIdsByStatus in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getConfigDocIdsByStatus()
  2. 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getConfigDocIdsByStatus()
1 call to LingotekSync::getConfigDocIdsByStatus()
LingotekSync::getDownloadableReport in lib/Drupal/lingotek/LingotekSync.php

File

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

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getConfigDocIdsByStatus($status) {
  $doc_ids = array();
  if (variable_get('lingotek_translate_config', 0)) {

    // retrieve document IDs from config chunks
    $cids = self::getChunkIdsByStatus($status);
    if (!empty($cids)) {
      $query = db_select('{lingotek_config_metadata}', 'meta');
      $query
        ->fields('meta', array(
        'value',
      ));
      $query
        ->condition('config_key', 'document_id');
      $query
        ->condition('id', $cids);
      $result = $query
        ->execute();
      $doc_ids = array_merge($doc_ids, $result
        ->fetchCol());
    }
  }
  return $doc_ids;
}