function openlayers_ui_admin_settings_submit in Openlayers 7.3
Submit callback of the Openlayers settings page.
File
- modules/
openlayers_ui/ includes/ openlayers_ui.admin.inc, line 154 - This file holds the functions for the main openlayers Admin settings.
Code
function openlayers_ui_admin_settings_submit($form, &$form_state) {
$values = $form_state['values'];
if (isset($values['variant'])) {
\Drupal\openlayers\Config::set('openlayers.variant', $values['variant']);
}
else {
\Drupal\openlayers\Config::clear('openlayers.variant');
}
if (isset($values['debug'])) {
\Drupal\openlayers\Config::set('openlayers.debug', $values['debug']);
}
else {
\Drupal\openlayers\Config::clear('openlayers.debug');
}
drupal_set_message(t('The configuration options have been saved.'));
drupal_flush_all_caches();
}