You are here

public static function LingotekSync::getLastSyncError in Lingotek Translation 7.7

1 call to LingotekSync::getLastSyncError()
lingotek_grid_query_status in ./lingotek.bulk_grid.inc

File

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

Class

LingotekSync
A utility class for Lingotek Syncing.

Code

public static function getLastSyncError($entity_type, $entity_id) {
  $error = '';
  $query = db_select('lingotek_entity_metadata', 'lem')
    ->fields('lem', array(
    'value',
  ))
    ->condition('lem.entity_id', $entity_id)
    ->condition('lem.entity_type', $entity_type)
    ->condition('lem.entity_key', 'last_sync_error');
  $last_sync_error = $query
    ->execute()
    ->fetchField();
  return $last_sync_error;
}