You are here

function hosting_block in Hosting 5

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

File

./hosting.module, line 225
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'] = array(
        'info' => t('Hosting queues'),
        'enabled' => 1,
        'region' => 'right',
        'weight' => 0,
      );
      $blocks['hosting_queues_summary'] = array(
        'info' => t('Hosting queues summary'),
        'enabled' => 1,
        'region' => 'right',
        'weight' => 1,
      );
      return $blocks;
    case 'view':
      switch ($delta) {
        case 'hosting_summary':
          return array(
            'title' => t('Summary'),
            'content' => hosting_summary_block(),
          );
          break;
        case 'hosting_queues':
          return array(
            'title' => t('Queues'),
            'content' => hosting_queue_block(),
          );
          break;
        case 'hosting_queues_summary':
          return array(
            'title' => t('Queues summary'),
            'content' => hosting_queue_summary_block(),
          );
          break;
      }
  }
}