You are here

function hosting_block in Hosting 6.2

Same name and namespace in other branches
  1. 5 hosting.module \hosting_block()

Implementation of hook_block().

File

./hosting.module, line 387
Hosting module.

Code

function hosting_block($op = 'list', $delta = 0, $edit = array()) {
  switch ($op) {
    case 'list':
      $blocks['hosting_summary'] = array(
        'info' => t('Hosting summary'),
        'enabled' => 1,
        'region' => 'left',
        'weight' => 10,
      );
      $blocks['hosting_queues_summary'] = array(
        'info' => t('Hosting queues summary'),
        'enabled' => 1,
        'region' => 'right',
        'weight' => 1,
        'cache' => BLOCK_NO_CACHE,
      );
      return $blocks;
    case 'view':
      switch ($delta) {
        case 'hosting_queues_summary':
          return array(
            'title' => t('Queues summary'),
            'content' => hosting_queue_summary_block(),
          );
      }
      break;
  }
}