public function ControlGoogleZoom::getSettingsForm in Geolocation Field 8.3
Same name and namespace in other branches
- 8.2 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/ControlGoogleZoom.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\ControlGoogleZoom::getSettingsForm()
Provide a generic map settings form array.
Parameters
array $settings: The current map settings.
array $parents: Form specific optional prefix.
Return value
array A form array to be integrated in whatever.
Overrides ControlGoogleElementBase::getSettingsForm
File
- modules/
geolocation_google_maps/ src/ Plugin/ geolocation/ MapFeature/ ControlGoogleZoom.php, line 32
Class
- ControlGoogleZoom
- Provides Zoom control element.
Namespace
Drupal\geolocation_google_maps\Plugin\geolocation\MapFeatureCode
public function getSettingsForm(array $settings, array $parents) {
$form = parent::getSettingsForm($settings, $parents);
$settings = array_replace_recursive(self::getDefaultSettings(), $settings);
$form['style'] = [
'#type' => 'select',
'#title' => $this
->t('Style'),
'#options' => [
'SMALL' => $this
->t('Small'),
'LARGE' => $this
->t('Large'),
],
'#default_value' => $settings['style'],
];
return $form;
}