You are here

function multiblock_block in MultiBlock 5

Same name and namespace in other branches
  1. 6 multiblock.module \multiblock_block()

Implementation of hook_block().

File

./multiblock.module, line 33

Code

function multiblock_block($op = 'list', $delta = 0, $edit = array()) {
  if ($op == 'list') {

    // Get all of the block instances that exist.
    $blocks = multiblock_get_block(NULL);
    $list = array();
    foreach ($blocks as $block) {
      $list[$block->delta] = array(
        'info' => $block->title,
      );
    }
    return $list;
  }
  else {
    if ($op == 'view' || $op == 'configure' || $op == 'save') {
      return multiblock_call_block($delta, $op, $edit);
    }
  }
}