hook_block_view($delta = '')Process the block when enabled in a region in order to view its contents.
The functions mymodule_display_block_exciting and _amazing, as used in the example, should of course be defined somewhere in your module and return the content you want to display to your users. If the "content" element is empty, no block will be displayed even if "subject" is present.
For a detailed usage example, see block_example.module.
$delta Which block to return. This is a descriptive string used to identify blocks within each module and also within the theme system. The $delta for each block is defined within the array that your module returns when the hook_block_info() implementation is called.
An array which must define a 'subject' element and a 'content' element defining the block indexed by $delta.
modules/block/block.api.php, line 134
<?php
function hook_block_view($delta = '') {
switch ($delta) {
case 'exciting':
$block = array(
'subject' => t('Default title of the exciting block'),
'content' => mymodule_display_block_exciting(),
);
break;
case 'amazing':
$block = array(
'subject' => t('Default title of the amazing block'),
'content' => mymodule_display_block_amazing(),
);
break;
}
return $block;
}
?>