function openlayers_ui_layers_settings_submit in Openlayers 6.2
Same name and namespace in other branches
- 7.2 modules/openlayers_ui/includes/openlayers_ui.layers.inc \openlayers_ui_layers_settings_submit()
Submit handler for openlayers_ui_layers_settings
File
- modules/
openlayers_ui/ includes/ openlayers_ui.layers.inc, line 100 - This file holds the functions handling layers in the Openlayers UI.
Code
function openlayers_ui_layers_settings_submit(&$form, &$form_state) {
$layer_types = openlayers_layer_types();
foreach ($form_state['values'] as $key => $value) {
if (in_array($key, array_keys($layer_types))) {
foreach ($value['settings'] as $k => $v) {
variable_set($k, $v);
}
}
}
}