You are here

function yamaps_uninstall in Yandex.Maps 7

Implements hook_uninstall().

File

./yamaps.install, line 61
Install, update, and uninstall functions for the yamaps module.

Code

function yamaps_uninstall() {

  // Delete block's settings.
  $blocks_amount = variable_get('yamaps_blocks_amount', 1);
  $delta = 'yamaps';
  for ($block_number = 1; $block_number <= $blocks_amount; $block_number++) {
    if ($block_number > 1) {
      $delta .= '_' . $block_number;
    }
    variable_del($delta . '_block_controls');
    variable_del($delta . '_block_behaviors');
    variable_del($delta . '_block_traffic');
    variable_del($delta . '_block_clusterer');
    variable_del($delta . '_block_auto_zoom');
    variable_del($delta . '_block_width');
    variable_del($delta . '_block_height');
    variable_del($delta . '_block_coords');
    variable_del($delta . '_block_type');
    variable_del($delta . '_block_placemarks');
    variable_del($delta . '_block_lines');
    variable_del($delta . '_block_polygons');
    variable_del($delta . '_block_routes');
    variable_del($delta . '_block_enable_placemarks');
    variable_del($delta . '_block_enable_lines');
    variable_del($delta . '_block_enable_polygons');
    variable_del($delta . '_block_enable_routes');
  }
  variable_del('yamaps_block_amount');
  variable_del('yamaps_api_key');
}