function globallink_beans_get_sent_rows_by_bid in GlobalLink Connect for Drupal 7.7
Same name and namespace in other branches
- 7.6 globallink_beans/globallink_beans.inc \globallink_beans_get_sent_rows_by_bid()
Gets sent beans rows by node ID.
Parameters
string $bid: The bean ID.
Return value
array Array of beans rows.
1 call to globallink_beans_get_sent_rows_by_bid()
- globallink_beans_send_for_translations in globallink_beans/
globallink_beans.inc - Sends beans for translation.
File
- globallink_beans/
globallink_beans.inc, line 79
Code
function globallink_beans_get_sent_rows_by_bid($bid) {
$result = db_select('globallink_document', 'gd')
->fields('gd')
->condition('object_id', $bid, '=')
->condition('entity_type', GLOBALLINK_ENTITY_TYPE_BEAN, '=')
->condition('target_status', array(
GLOBALLINK_STATUS_TRANSLATION_SENT,
GLOBALLINK_STATUS_TRANSLATION_ERROR,
GLOBALLINK_STATUS_TRANSLATION_COMPLETED,
), 'IN')
->execute();
$rows = array();
foreach ($result as $row) {
$rows[] = $row;
}
return $rows;
}