You are here

function getlocations_leaflet_map_get_info in Get Locations 7

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

Get all available Leaflet map definitions.

Derived from the leaflet module

Parameters

string $map:

7 calls to getlocations_leaflet_map_get_info()
getlocations_leaflet_display_options_form in modules/getlocations_leaflet/getlocations_leaflet.module
Function
getlocations_leaflet_entity_type_map in modules/getlocations_leaflet/getlocations_leaflet.module
Function
getlocations_leaflet_field_formatter_view in modules/getlocations_leaflet/getlocations_leaflet.module
Implements hook_field_formatter_view(). Build a renderable array for a field value.
getlocations_leaflet_map_settings_do in modules/getlocations_leaflet/getlocations_leaflet.module
Function
getlocations_leaflet_requirements in modules/getlocations_leaflet/getlocations_leaflet.install
Implements hook_requirements().

... See full list

File

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

Code

function getlocations_leaflet_map_get_info($map = NULL) {
  static $drupal_static_fast;
  if (!isset($drupal_static_fast)) {
    $drupal_static_fast['getlocations_leaflet_map_info'] =& drupal_static(__FUNCTION__);
  }
  $map_info =& $drupal_static_fast['getlocations_leaflet_map_info'];
  if (empty($map_info)) {
    if ($cache = cache_get("getlocations_leaflet_map_info")) {
      $map_info = $cache->data;
    }
    else {
      $map_info = module_invoke_all('getlocations_leaflet_map_info');

      // Let other modules alter the map info.
      drupal_alter('getlocations_leaflet_map_info', $map_info);
      cache_set("getlocations_leaflet_map_info", $map_info);
    }
  }
  if (empty($map)) {
    return $map_info;
  }
  elseif (isset($map_info[$map])) {
    return $map_info[$map];
  }
}