You are here

function globallink_block_get_active_submission_names in GlobalLink Connect for Drupal 7.6

Same name and namespace in other branches
  1. 7.5 globallink_block/globallink_block.inc \globallink_block_get_active_submission_names()

Gets block active submission names.

Return value

array Array of block submission names.

2 calls to globallink_block_get_active_submission_names()
globallink_block_active_form in globallink_block/globallink_block_active_submissions.inc
Builds form to show all active block submissions.
globallink_block_active_select_form in globallink_block/globallink_block_active_submissions.inc
Builds form to allow selection of specific block submission by ID.

File

globallink_block/globallink_block.inc, line 342

Code

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