You are here

function globallink_eck_get_sent_rows_by_id in GlobalLink Connect for Drupal 7.7

1 call to globallink_eck_get_sent_rows_by_id()
globallink_send_entity_ref_for_translations in ./globallink_background_jobs.inc

File

globallink_custom_entity/globallink_custom_entity.inc, line 429

Code

function globallink_eck_get_sent_rows_by_id($id, $object_type) {
  $result = db_select('globallink_document', 'gd')
    ->fields('gd')
    ->condition('entity_type', GLOBALLINK_ENTITY_TYPE_ECK_ENTITY, '=')
    ->condition('object_id', $id, '=')
    ->condition('object_type', $object_type, '=')
    ->condition('target_status', array(
    GLOBALLINK_STATUS_TRANSLATION_SENT,
    GLOBALLINK_STATUS_TRANSLATION_COMPLETED,
    GLOBALLINK_STATUS_TRANSLATION_ERROR,
  ), 'IN')
    ->execute();
  $rows = array();
  foreach ($result as $row) {
    $rows[] = $row;
  }
  return $rows;
}