You are here

function route_planner_block_save in Route Planner 7

Same name and namespace in other branches
  1. 8 route_planner.module \route_planner_block_save()

Implements hook_block_save().

File

./route_planner.module, line 61
The Route Planner module create blocks to show a route from any address to a fixed point.

Code

function route_planner_block_save($delta = '', $edit = array()) {
  switch ($delta) {
    case 'route_target':
    case 'map':
      variable_set('route_planner_address', $edit['route_planner_address']);
      variable_set('route_planner_api_key', $edit['route_planner_api_key']);
      variable_set('route_planner_api_language', $edit['route_planner_api_language']);
      variable_set('route_planner_map_height', $edit['route_planner_map_height']);
      variable_set('route_planner_map_width', $edit['route_planner_map_width']);
      variable_set('route_planner_map_zoom', intval($edit['route_planner_map_zoom']));
      variable_set('route_planner_map_zoomcontrol', intval($edit['route_planner_map_zoomcontrol']));
      variable_set('route_planner_map_scrollwheel', intval($edit['route_planner_map_scrollwheel']));
      variable_set('route_planner_map_maptypecontrol', intval($edit['route_planner_map_maptypecontrol']));
      variable_set('route_planner_map_scalecontrol', intval($edit['route_planner_map_scalecontrol']));
      variable_set('route_planner_map_draggable', intval($edit['route_planner_map_draggable']));
      variable_set('route_planner_map_doubbleclick', intval($edit['route_planner_map_doubbleclick']));
      variable_set('route_planner_map_streetviewcontrol', intval($edit['route_planner_map_streetviewcontrol']));
      variable_set('route_planner_map_overviewmapcontrol', intval($edit['route_planner_map_overviewmapcontrol']));
      variable_set('route_planner_unitsystem', intval($edit['route_planner_unitsystem']));
      variable_set('route_planner_map_defaultui', intval($edit['route_planner_map_defaultui']));
      variable_set('route_planner_map_style', $edit['route_planner_map_style']);
      variable_set('route_planner_map_travelmode', intval($edit['route_planner_map_travelmode']));
      break;
  }
}