You are here

function process_gmap_control in GMap Module 5

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

Generic gmap control #process function.

File

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

Code

function process_gmap_control($element, $edit) {
  $control = substr($element['#type'], 5);
  $element['#type'] = $element['#gmap_newtype'];
  unset($element['#gmap_newtype']);
  gmap_widget_setup($element, $control);

  // Inherit #input from the new type.
  unset($element['#input']);

  // Merge in the defaults for the target element type.
  $element += _element_info($element['#type']);
  return $element;
}