public function ControlElementBase::getSettingsForm in Geolocation Field 8.3
Same name in this branch
- 8.3 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\ControlElementBase::getSettingsForm()
- 8.3 modules/geolocation_yandex/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_yandex\Plugin\geolocation\MapFeature\ControlElementBase::getSettingsForm()
- 8.3 modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature\ControlElementBase::getSettingsForm()
Same name and namespace in other branches
- 8.2 modules/geolocation_yandex/src/Plugin/geolocation/MapFeature/ControlElementBase.php \Drupal\geolocation_yandex\Plugin\geolocation\MapFeature\ControlElementBase::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_yandex/ src/ Plugin/ geolocation/ MapFeature/ ControlElementBase.php, line 27
Class
- ControlElementBase
- Class ControlMapFeatureBase.
Namespace
Drupal\geolocation_yandex\Plugin\geolocation\MapFeatureCode
public function getSettingsForm(array $settings, array $parents) {
$form = parent::getSettingsForm($settings, $parents);
$settings = array_replace_recursive(self::getDefaultSettings(), $settings);
$form['position'] = [
'#type' => 'select',
'#title' => $this
->t('Position'),
'#options' => Yandex::getControlPositions(),
'#default_value' => $settings['position'],
];
return $form;
}