You are here

function globallink_taxonomy_get_row in GlobalLink Connect for Drupal 7.5

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

Retrieves taxonomy's row by ID.

Parameters

string $object_id: The object ID.

string $object_type: The object type.

string $source: The target source.

string $target: The target.

Return value

The row if taxonomy exists.

1 call to globallink_taxonomy_get_row()
globallink_taxonomy_update_ticket_id in globallink_taxonomy/globallink_taxonomy.inc
Updates taxonomy ticket ID on GlobalLink.

File

globallink_taxonomy/globallink_taxonomy.inc, line 312

Code

function globallink_taxonomy_get_row($object_id, $object_type, $source, $target) {
  $result = db_select('globallink_core_taxonomy', 'tco')
    ->fields('tco')
    ->condition('object_id', $object_id, '=')
    ->condition('object_type', $object_type, '=')
    ->condition('source', $source, '=')
    ->condition('target', $target, '=')
    ->execute();
  foreach ($result as $row) {
    return $row;
  }
  return FALSE;
}