public function Geolocation::getSettingsForm in Geolocation Field 8.3
Same name and namespace in other branches
- 8 src/Plugin/Geocoder/Field/Geolocation.php \Drupal\geolocation\Plugin\Geocoder\Field\Geolocation::getSettingsForm()
- 8.2 src/Plugin/Geocoder/Field/Geolocation.php \Drupal\geolocation\Plugin\Geocoder\Field\Geolocation::getSettingsForm()
File
- src/
Plugin/ Geocoder/ Field/ Geolocation.php, line 25
Class
- Geolocation
- Provides a geolocation geocoder field plugin.
Namespace
Drupal\geolocation\Plugin\Geocoder\FieldCode
public function getSettingsForm(FieldConfigInterface $field, array $form, FormStateInterface &$form_state) {
$element = parent::getSettingsForm($field, $form, $form_state);
// Hard-wire the dumper for geolocation fields, but make multiple
// geolocation dumpers possible.
$options = $element['dumper']['#options'];
foreach ($options as $key => $option) {
if (strpos($key, 'geolocation') !== 0) {
unset($options[$key]);
}
}
$element['dumper']['#options'] = $options;
return $element;
}