You are here

function multiblock_block in MultiBlock 6

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

Implementation of hook_block().

File

./multiblock.module, line 31

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' => check_plain($block->title));
      $list[$block->delta] = array(
        'info' => $block->title,
      );
    }
    return $list;
  }
  else {
    if ($op == 'view' || $op == 'configure' || $op == 'save') {
      return multiblock_call_block($delta, $op, $edit);
    }
  }
}