public static function LingotekSync::getDocumentId in Lingotek Translation 7.7
1 call to LingotekSync::getDocumentId()
- lingotek_delete_menu_link_translations in ./lingotek.util.inc
File
- lib/Drupal/lingotek/LingotekSync.php, line 1298
- LingotekSync
Class
- LingotekSync
- A utility class for Lingotek Syncing.
Code
public static function getDocumentId($entity_type, $entity_id) {
$doc_id = db_select('lingotek_entity_metadata', 'lem')
->fields('lem', array(
'value',
))
->condition('lem.entity_type', $entity_type)
->condition('lem.entity_id', $entity_id)
->condition('lem.entity_key', 'document_id')
->execute()
->fetch(PDO::FETCH_ASSOC);
if ($doc_id) {
return $doc_id;
}
else {
return FALSE;
}
}