You are here

public static function LingotekSync::getEntityIdsByStatusAndTarget in Lingotek Translation 7.5

1 call to LingotekSync::getEntityIdsByStatusAndTarget()
lingotek_grid_update in ./lingotek.bulk_grid.inc

File

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

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getEntityIdsByStatusAndTarget($entity_type, $status, $target_language = '%') {
  $query = db_select('{lingotek_entity_metadata}', 'l')
    ->distinct()
    ->condition('entity_type', $entity_type)
    ->condition('entity_key', 'target_sync_status_' . $target_language, 'LIKE')
    ->condition('value', $status);
  $query
    ->addField('l', 'entity_id', 'nid');
  $result = $query
    ->execute()
    ->fetchCol();
  return $result;
}