public static function LingotekSync::getDocIdsFromEntityIds in Lingotek Translation 7.6
Same name and namespace in other branches
- 7.7 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdsFromEntityIds()
- 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdsFromEntityIds()
3 calls to LingotekSync::getDocIdsFromEntityIds()
- lingotek_entity_disassociate_form_submit in ./
lingotek.bulk_grid.inc - Submit handler for the lingotek_entity_disassociate form.
- lingotek_get_change_workflow_form_submit in ./
lingotek.module - lingotek_update_target_progress_batch_create in ./
lingotek.batch.inc
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 878 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getDocIdsFromEntityIds($entity_type, $entity_ids, $associate = FALSE) {
$query = db_select('lingotek_entity_metadata', 'l');
$query
->addField('l', 'value', 'doc_id');
$query
->condition('entity_type', $entity_type);
$query
->condition('entity_id', $entity_ids, 'IN');
$query
->condition('entity_key', 'document_id');
if ($associate) {
$query
->addField('l', 'entity_id', 'nid');
$result = $query
->execute()
->fetchAllAssoc('nid');
}
else {
$result = $query
->execute()
->fetchCol();
}
return $result;
}