function globallink_entity_get_row_id_from_submission in GlobalLink Connect for Drupal 7.6
Same name and namespace in other branches
- 7.5 globallink_entity/globallink_entity.inc \globallink_entity_get_row_id_from_submission()
Gets entity row ID from submission details.
Parameters
string $submission_ticket: The submission ticket.
string $document_ticket: The document ticket.
string $target_locale: The target locale.
Return value
string The entity row ID. FALSE if the row doesn't exist.
1 call to globallink_entity_get_row_id_from_submission()
- globallink_entity_receive_form in globallink_entity/
globallink_entity_receive.inc - Builds form to receive an entity submission.
File
- globallink_entity/
globallink_entity.inc, line 444
Code
function globallink_entity_get_row_id_from_submission($submission_ticket, $document_ticket, $target_locale) {
$query = db_select('globallink_core_entity', 'tc');
$query
->condition('submission_ticket', $submission_ticket, '=');
$query
->condition('document_ticket', $document_ticket, '=');
$query
->condition('target', $target_locale, '=');
$query
->fields('tc');
$results = $query
->execute();
foreach ($results as $row) {
// Return the first one
return $row->rid;
}
}