public function ControlGoogleElementBase::getSettingsForm in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/ControlGoogleElementBase.php \Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature\ControlGoogleElementBase::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 ControlElementBase::getSettingsForm
2 calls to ControlGoogleElementBase::getSettingsForm()
- ControlGoogleMapType::getSettingsForm in modules/
geolocation_google_maps/ src/ Plugin/ geolocation/ MapFeature/ ControlGoogleMapType.php - Provide a generic map settings form array.
- ControlGoogleZoom::getSettingsForm in modules/
geolocation_google_maps/ src/ Plugin/ geolocation/ MapFeature/ ControlGoogleZoom.php - Provide a generic map settings form array.
2 methods override ControlGoogleElementBase::getSettingsForm()
- ControlGoogleMapType::getSettingsForm in modules/
geolocation_google_maps/ src/ Plugin/ geolocation/ MapFeature/ ControlGoogleMapType.php - Provide a generic map settings form array.
- ControlGoogleZoom::getSettingsForm in modules/
geolocation_google_maps/ src/ Plugin/ geolocation/ MapFeature/ ControlGoogleZoom.php - Provide a generic map settings form array.
File
- modules/
geolocation_google_maps/ src/ Plugin/ geolocation/ MapFeature/ ControlGoogleElementBase.php, line 26
Class
- ControlGoogleElementBase
- Class ControlMapFeatureBase.
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['behavior'] = [
'#type' => 'select',
'#title' => $this
->t('Display behavior'),
'#options' => [
'default' => $this
->t('Default (Display control at 200px width minimum.)'),
'always' => $this
->t('Always (Display control regardless of map dimensions.)'),
],
'#default_value' => $settings['behavior'],
];
return $form;
}