You are here

function globallink_entity_get_distinct_active_submission_names in GlobalLink Connect for Drupal 7.5

Same name and namespace in other branches
  1. 7.6 globallink_entity/globallink_entity.inc \globallink_entity_get_distinct_active_submission_names()

Gets distinct active entity submission names.

Return value

array Array of distinct active entity submission names.

3 calls to globallink_entity_get_distinct_active_submission_names()
globallink_entity_active_form in globallink_entity/globallink_entity_active_submissions.inc
Builds form to show all active entity submissions.
globallink_entity_active_select_form in globallink_entity/globallink_entity_active_submissions.inc
Builds form to allow selection of specific entity submission by ID.
globallink_entity_receive_filter_form in globallink_entity/globallink_entity_receive.inc
Builds form to filter entities to receive on dashboard.

File

globallink_entity/globallink_entity.inc, line 415

Code

function globallink_entity_get_distinct_active_submission_names() {
  $query = db_select('globallink_core_entity', 'tc');
  $query
    ->condition('status', array(
    'Sent for Translations',
    'Error',
  ), 'IN');
  $query
    ->distinct();
  $query
    ->fields('tc');
  $results = $query
    ->execute();
  $arr = array(
    '' => '-- Select a Submission --',
  );
  foreach ($results as $row) {
    $arr[$row->submission_ticket] = $row->submission;
  }
  return $arr;
}