function hosting_queues in Hostmaster (Aegir) 6
List queues or tasks in a queue if a key is provided.
See also
4 string references to 'hosting_queues'
- hosting_block in modules/
hosting/ hosting.module - Implementation of hook_block().
- hosting_menu in modules/
hosting/ hosting.module - Implementation of hook_menu().
- hosting_update_6001 in modules/
hosting/ hosting.install - Implements hook_update_N().
- hostmaster_task_finalize in ./
hostmaster.profile
File
- modules/
hosting/ hosting.module, line 534 - 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;
}