You are here

function globallink_taxonomy_get_sent_rows_by_bid in GlobalLink Connect for Drupal 7.7

Same name and namespace in other branches
  1. 7.5 globallink_taxonomy/globallink_taxonomy.inc \globallink_taxonomy_get_sent_rows_by_bid()
  2. 7.6 globallink_taxonomy/globallink_taxonomy.inc \globallink_taxonomy_get_sent_rows_by_bid()

Gets active taxonomy submission rows by object ID.

Parameters

string $bid: The taxonomy object ID.

Return value

Associative array of taxonomy active submission rows. FALSE if the array is empty.

1 call to globallink_taxonomy_get_sent_rows_by_bid()
globallink_taxonomy_send_for_translations in globallink_taxonomy/globallink_taxonomy.inc
Sends taxonomies for translation.

File

globallink_taxonomy/globallink_taxonomy.inc, line 738

Code

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