You are here

function hosting_queues in Hosting 5

Same name and namespace in other branches
  1. 6.2 hosting.module \hosting_queues()
  2. 7.4 hosting.module \hosting_queues()
  3. 7.3 hosting.module \hosting_queues()

List queues or tasks in a queue if a key is provided

2 string references to 'hosting_queues'
hosting_block in ./hosting.module
hosting_menu in ./hosting.module
Implementation of hook_menu()

File

./hosting.module, line 457
Hosting module

Code

function hosting_queues($key = '') {
  $queues = hosting_get_queues();
  if ($queues[$key]) {
    if ($queues[$key]['name']) {
      $output .= "<h1>" . $queues[$key]['name'] . "</h1>";
    }
    $func = 'hosting_' . $queues[$key]['singular'] . '_list';
    if (function_exists($func)) {
      $output .= $func();
    }
  }
  else {
    foreach ($queues as $key => $queue) {
      $item[] = l($queue['name'], 'hosting/queues/' . $key);
    }
    $output .= theme('item_list', $item, t('Queues'));
  }
  return $output;
}