You are here

public static function LingotekSync::getEntityIdsByProfileStatus in Lingotek Translation 7.5

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

File

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

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getEntityIdsByProfileStatus($entity_type, $status) {
  $query = db_select('{lingotek_entity_metadata}', 'l')
    ->distinct()
    ->condition('entity_type', $entity_type)
    ->condition('entity_key', 'profile')
    ->condition('value', $status);
  $query
    ->addField('l', 'entity_id', 'nid');
  $result = $query
    ->execute()
    ->fetchCol();
  return $result;
}