You are here

function easy_breadcrumb_block in Easy Breadcrumb 6

Implements hook_block().

Parameters

string $op: What kind of information to retrieve about the block or blocks. Possible values: 'list': A list of all blocks defined by the module. 'configure': Configuration form for the block. 'save': Save the configuration options. 'view': Process the block when enabled in a region in order to view its contents.

int $delta: Which block to return (not applicable if $op is 'list'). See above for more information about delta values.

string $edit: If $op is 'save', the submitted form data from the configuration form.

Return value

array block.

File

./easy_breadcrumb.module, line 152
The Easy Breadcrumb module provides a block to be embedded in any page, typically at some place near the page's header. Easy Breadcrumb uses the URL (path alias) and the current page's title (when available) to obtain the breadcrumb's…

Code

function easy_breadcrumb_block($op = 'list', $delta = 0, $edit = array()) {
  $blocks = array();
  if ($op === 'list') {
    $blocks[] = array(
      'info' => t('Easy Breadcrumb'),
      'cache' => BLOCK_CACHE_PER_PAGE,
    );
  }
  elseif ($op === 'view') {
    switch ($delta) {
      case 0:
        require_once 'includes/easy_breadcrumb.blocks.inc';
        $blocks['subject'] = NULL;
        $blocks['content'] = _easy_breadcrumb_block();
        break;
    }
  }
  return $blocks;
}