function queue_ui_queues in Queue UI 7
Same name and namespace in other branches
- 6 queue_ui.module \queue_ui_queues()
- 7.2 queue_ui.module \queue_ui_queues()
Get queues.
Return value
Array of queues indexed by name and containing queue object and number of items.
1 call to queue_ui_queues()
File
- ./
queue_ui.module, line 68 - queue_ui.module
Code
function queue_ui_queues() {
$queues = array();
$queue_names = queue_ui_queue_names();
if (!empty($queue_names)) {
// Build array of queues indexed by name with number of items.
foreach ($queue_names as $name) {
$queue = DrupalQueue::get($name->name);
$queues[$name->name] = array(
'queue' => $queue,
'items' => $queue
->numberOfItems(),
);
}
}
return $queues;
}