You are here

function getlocations_blocks_block_view in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_blocks/getlocations_blocks.module \getlocations_blocks_block_view()

Implements hook_block_view().

This hook generates the contents of the blocks themselves.

File

modules/getlocations_blocks/getlocations_blocks.module, line 371
getlocations_blocks.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_blocks_block_view($delta = '') {
  $block = array();

  //The $delta parameter tells us which block is being requested.
  switch ($delta) {
    case 'getlocations_blocks_city':
      $block['subject'] = t('Getlocations cities');
      $block['content'] = getlocations_blocks_contents($delta);
      break;
    case 'getlocations_blocks_province':
      $block['subject'] = t('Getlocations provinces');
      $block['content'] = getlocations_blocks_contents($delta);
      break;
    case 'getlocations_blocks_postalcode':
      $block['subject'] = t('Getlocations post codes');
      $block['content'] = getlocations_blocks_contents($delta);
      break;
    case 'getlocations_blocks_country':
      $block['subject'] = t('Getlocations countries');
      $block['content'] = getlocations_blocks_contents($delta);
      break;
  }
  return $block;
}