public static function LingotekSync::getDocIdFromEntityId in Lingotek Translation 7.7
Same name and namespace in other branches
- 7.5 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdFromEntityId()
- 7.6 lib/Drupal/lingotek/LingotekSync.php \LingotekSync::getDocIdFromEntityId()
1 call to LingotekSync::getDocIdFromEntityId()
File
- lib/
Drupal/ lingotek/ LingotekSync.php, line 1189 - LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getDocIdFromEntityId($entity_type, $entity_id) {
$found = FALSE;
$query = db_select('lingotek_entity_metadata', 'l')
->fields('l');
$query
->condition('entity_type', $entity_type);
$query
->condition('entity_id', $entity_id);
$query
->condition('entity_key', 'document_id');
$result = $query
->execute();
if ($record = $result
->fetchAssoc()) {
$found = $record['value'];
}
return $found;
}