You are here

function og_subgroups_block in Subgroups for Organic groups 6

Same name and namespace in other branches
  1. 5.4 og_subgroups.module \og_subgroups_block()
  2. 5 og_subgroups.module \og_subgroups_block()

Implementation of hook_block().

Displays the book table of contents in a block when the current page is a single-node view inside a group context.

File

./og_subgroups.module, line 212
Maintains a hierarchy of groups created by the orgainc groups module.

Code

function og_subgroups_block($op = 'list', $delta = 0) {
  if ($op == 'list') {
    $blocks = array();
    $blocks['hierarchy']['info'] = t('Subgroups');
    return $blocks;
  }
  else {
    if ($op == 'view') {
      switch ($delta) {
        case 'hierarchy':
          $block = _og_subgroups_hierarchy_block();
          break;
      }
      return $block;
    }
  }
}