You are here

function globallink_interface_get_sent_rows_by_lid in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.6 globallink_interface/globallink_interface.inc \globallink_interface_get_sent_rows_by_lid()

Gets sent interface rows by LID.

Parameters

string $lid: The interface LID.

Return value

array Array of interface rows.

1 call to globallink_interface_get_sent_rows_by_lid()
globallink_interface_send_for_translations in globallink_interface/globallink_interface.inc
Sends interfaces for translation.

File

globallink_interface/globallink_interface.inc, line 141

Code

function globallink_interface_get_sent_rows_by_lid($lid) {
  $result = db_select('globallink_document', 'gd')
    ->fields('gd')
    ->condition('entity_type', GLOBALLINK_ENTITY_TYPE_INTERFACE, '=')
    ->condition('object_id', $lid, '=')
    ->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;
}