public function FitLocations::getSettingsForm in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/geolocation/MapCenter/FitLocations.php \Drupal\geolocation\Plugin\geolocation\MapCenter\FitLocations::getSettingsForm()
Settings form by ID and context.
Parameters
int $center_option_id: MapCenter option ID.
array $settings: The current option settings.
mixed $context: Current context.
Return value
array A form array to be integrated in whatever.
Overrides MapCenterBase::getSettingsForm
File
- src/
Plugin/ geolocation/ MapCenter/ FitLocations.php, line 33
Class
- FitLocations
- Fixed coordinates map center.
Namespace
Drupal\geolocation\Plugin\geolocation\MapCenterCode
public function getSettingsForm($option_id = NULL, array $settings = [], $context = NULL) {
$form = parent::getSettingsForm($option_id, $settings, $context);
$form['reset_zoom'] = [
'#type' => 'checkbox',
'#title' => $this
->t('Reset zoom after fit.'),
'#default_value' => $settings['reset_zoom'],
];
return $form;
}