public function MapRestriction::getSettingsForm in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MapRestriction.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\MapRestriction::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_google_maps/ src/ Plugin/ geolocation/ MapFeature/ MapRestriction.php, line 35
Class
- MapRestriction
- Provides Google Maps.
Namespace
Drupal\geolocation_google_maps\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;
}