You are here

function hosting_queue_block in Hosting 7.3

Same name and namespace in other branches
  1. 5 hosting.module \hosting_queue_block()
  2. 7.4 hosting.module \hosting_queue_block()

Build a block of the hosting queues.

See also

hosting_TASK_SINGULAR_summary()

1 call to hosting_queue_block()
hosting_block_view in ./hosting.module
Implements hook_block_view().

File

./hosting.module, line 651
Hosting module.

Code

function hosting_queue_block() {
  if (user_access('access task logs')) {
    $queues = hosting_get_queues();
    $output = '';
    foreach ($queues as $queue => $info) {

      // Invoke hosting_TASK_SINGULAR_summary().
      $func = 'hosting_' . $info['singular'] . '_summary';
      if (function_exists($func)) {
        $output .= $func();
      }
    }
    return $output;
  }
}