public function LeafletMaxBounds::getSettingsForm in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/LeafletMaxBounds.php \Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature\LeafletMaxBounds::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 MapFeatureBase::getSettingsForm
File
- modules/
geolocation_leaflet/ src/ Plugin/ geolocation/ MapFeature/ LeafletMaxBounds.php, line 35
Class
- LeafletMaxBounds
- Provides Leaflet.
Namespace
Drupal\geolocation_leaflet\Plugin\geolocation\MapFeatureCode
public function getSettingsForm(array $settings, array $parents) {
$settings = $this
->getSettings($settings);
$form['north'] = [
'#type' => 'textfield',
'#title' => $this
->t('North'),
'#size' => 15,
'#default_value' => $settings['north'],
];
$form['south'] = [
'#type' => 'textfield',
'#title' => $this
->t('South'),
'#size' => 15,
'#default_value' => $settings['south'],
];
$form['east'] = [
'#type' => 'textfield',
'#title' => $this
->t('East'),
'#size' => 15,
'#default_value' => $settings['east'],
];
$form['west'] = [
'#type' => 'textfield',
'#title' => $this
->t('West'),
'#size' => 15,
'#default_value' => $settings['west'],
];
return $form;
}