farm_map.install in farmOS 7
Farm map install.
File
modules/farm/farm_map/farm_map.installView source
<?php
/**
* @file
* Farm map install.
*/
/**
* Copy the Google Maps API key into the new configuration variable.
*/
function farm_map_update_7000(&$sandbox) {
// Removed.
}
/**
* Delete the old farm_map_default_base_layer variable.
*/
function farm_map_update_7001(&$sandbox) {
variable_del('farm_map_default_base_layer');
}
/**
* Install new Google Maps module if an API key is saved.
*/
function farm_map_update_7002(&$sandbox) {
$module = 'farm_map_google';
if (variable_get('farm_map_google_api_key', FALSE) && !module_exists($module)) {
module_enable(array(
$module,
));
}
}
/**
* Install new Mapbox module if an API key is saved.
*/
function farm_map_update_7003(&$sandbox) {
$module = 'farm_map_mapbox';
if (variable_get('farm_map_mapbox_api_key', FALSE) && !module_exists($module)) {
module_enable(array(
$module,
));
}
}
/**
* Delete the old farm_map_show variable.
*/
function farm_map_update_7004(&$sandbox) {
variable_del('farm_map_show');
}
Functions
Name![]() |
Description |
---|---|
farm_map_update_7000 | Copy the Google Maps API key into the new configuration variable. |
farm_map_update_7001 | Delete the old farm_map_default_base_layer variable. |
farm_map_update_7002 | Install new Google Maps module if an API key is saved. |
farm_map_update_7003 | Install new Mapbox module if an API key is saved. |
farm_map_update_7004 | Delete the old farm_map_show variable. |