You are here

function openlayers_block_block_view in Openlayers 7.3

Implements hook_block_view().

File

modules/openlayers_block/openlayers_block.module, line 26
Openlayers Block module.

Code

function openlayers_block_block_view($delta = '') {
  $block = array();
  if ($map = _openlayers_block_get_map($delta)) {
    $block['subject'] = $map
      ->getName();
    $block['content'] = array(
      '#type' => 'openlayers',
      '#map' => $map,
    );
  }
  return $block;
}