I have multiple blocks that I have defined via hook_block_info that I am able to view and configure in 'blocks'. I am able to create a hooks_block_view function that will allow the first block defined ('v01_inputs') to be viewed on the designated page.
Assuming that I'm looking for a very 'hello world' like statement for each block, such as:
$content = t('Hello World');
$block['subject'] = t('Hi yourself');
$block['content'] = $content;
return $block;
How do I expand hook_block_view now to allow the remaining defined blocks to be viewed?
function v01_block_info() {
$blocks['v01_inputs'] = array (
'info' => t('Vehicle Payment Inputs'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_heading'] = array (
'info' => t('Vehicle Payment Heading'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_results'] = array (
'info' => t('Vehicle Payment Results'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_graph'] = array (
'info' => t('Vehicle Payment Graph'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_table'] = array (
'info' => t('Vehicle Payment Table'),
'cache' => DRUPAL_NO_CACHE,
);
$blocks['v01_options'] = array (
'info' => t('Vehicle Payment Options'),
'cache' => DRUPAL_NO_CACHE,
);
return $blocks;
}
function v01_block_view($delta = 'v01_inputs') {