function hosting_queues in Hosting 7.4
Same name and namespace in other branches
- 5 hosting.module \hosting_queues()
- 6.2 hosting.module \hosting_queues()
- 7.3 hosting.module \hosting_queues()
List queues or tasks in a queue if a key is provided.
See also
3 string references to 'hosting_queues'
- hosting_block_view in ./
hosting.module - Implements hook_block_view().
- hosting_menu in ./
hosting.module - Implements hook_menu().
- hosting_update_6001 in ./
hosting.install - Implements hook_update_N().
File
- ./
hosting.module, line 880 - Hosting module.
Code
function hosting_queues($key = '') {
$queues = hosting_get_queues();
$output = '';
if ($queues[$key]) {
if ($queues[$key]['name']) {
$output .= "<h1>" . $queues[$key]['name'] . "</h1>";
}
// Invoke hosting_TASK_SINGULAR_list().
$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', array(
'items' => $item,
'title' => t('Queues'),
));
}
return $output;
}