You are here

function gmap_module_invoke in GMap Module 7.2

Same name and namespace in other branches
  1. 5 gmap.module \gmap_module_invoke()
  2. 6.2 gmap.module \gmap_module_invoke()
  3. 6 gmap.module \gmap_module_invoke()
  4. 7 gmap.module \gmap_module_invoke()

Invokes hook_gmap() in every module.

@todo move this to GmapBehaviours class We can't use module_invoke_all() because we pass $map by reference.

See also

https://drupal.org/node/2146871

5 calls to gmap_module_invoke()
GmapDefaults::__construct in lib/Drupal/gmap/GmapDefaults.php
Do not change.
GmapMacroToolbox::getParsedMacro in lib/Drupal/gmap/GmapMacroToolbox.php
Getting a parsed macro.
gmap_admin_settings in ./gmap_settings_ui.inc
Admin settings form.
gmap_macro_builder_form in ./gmap_macro_builder.module
Macro builder form.
theme_gmap in ./gmap.module
Gmap element theme hook.

File

./gmap.module, line 64
GMap -- Routines to use the Google Maps API in Drupal.

Code

function gmap_module_invoke($op, &$map) {
  $return = array();
  foreach (module_implements('gmap') as $module) {
    $function = $module . '_gmap';
    $result = $function($op, $map);
    if (isset($result) && is_array($result)) {
      $return = array_merge_recursive($return, $result);
    }
    elseif (isset($result)) {
      $return[] = $result;
    }
  }
  return $return;
}