public function XYZ::optionsFormSubmit in Openlayers 7.3
Submit callback for the options form.
Parameters
array $form: The form array.
array $form_state: The form_state array by reference.
Overrides Base::optionsFormSubmit
File
- src/
Plugin/ Source/ XYZ/ XYZ.php, line 38 - Source: XYZ.
Class
- XYZ
- Class XYZ.
Namespace
Drupal\openlayers\Plugin\Source\XYZCode
public function optionsFormSubmit(array $form, array &$form_state) {
if ($form_state['values']['options']['url'] == '') {
unset($form_state['item']->options['url']);
}
if ($form_state['values']['options']['crossOrigin'] == '') {
unset($form_state['item']->options['crossOrigin']);
}
parent::optionsFormSubmit($form, $form_state);
}