You are here

function openlayers_block_switcher_block_info in Openlayers 7.3

Implements hook_block_info().

File

modules/openlayers_block_switcher/openlayers_block_switcher.module, line 10
Openlayers Block Switcher.

Code

function openlayers_block_switcher_block_info() {
  $maps = (array) _olebs_get_maps_with_blockswitcher();
  $blocks = array();
  foreach ($maps as $map) {
    $blockid = _olebs_get_block_id($map
      ->getMachineName());
    $blocks[$blockid]['info'] = t('Openlayers layer switcher for @name', array(
      '@name' => $map
        ->getName(),
    ));
  }
  return $blocks;
}