You are here

function spaces_block in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces.module \spaces_block()
  2. 5 spaces.module \spaces_block()
  3. 6.3 spaces.module \spaces_block()

Implementation of hook_block()

File

./spaces.module, line 235

Code

function spaces_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks[1]['info'] = t('Spaces: Contextual Tools');
    $blocks[2]['info'] = t('Spaces: Navigation');
    $blocks[3]['info'] = t('Spaces: Utility links');
    return $blocks;
  }
  else {
    if ($op == 'view') {
      switch ($delta) {
        case 1:
          return _spaces_block_tools();
        case 2:
          return _spaces_block_nav();
        case 3:
          return _spaces_block_utility_links();
      }
    }
  }
}