function globallink_entity_get_sent_rows_by_nid in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.5 globallink_entity/globallink_entity.inc \globallink_entity_get_sent_rows_by_nid()
- 7.6 globallink_entity/globallink_entity.inc \globallink_entity_get_sent_rows_by_nid()
Gets sent entity rows by node ID.
Parameters
string $nid: The node ID.
Return value
array Array of entity rows.
1 call to globallink_entity_get_sent_rows_by_nid()
- globallink_entity_send_for_translations in globallink_entity/
globallink_entity.inc - Sends entities for translation.
File
- globallink_entity/
globallink_entity.inc, line 105
Code
function globallink_entity_get_sent_rows_by_nid($nid) {
$result = db_select('globallink_document', 'gd')
->fields('gd')
->condition('entity_type', GLOBALLINK_ENTITY_TYPE_ENTITY, '=')
->condition('object_id', $nid, '=')
->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;
}