public function FixedBoundaries::getSettingsForm in Geolocation Field 8.3
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/ FixedBoundaries.php, line 35
Class
- FixedBoundaries
- Fixed boundaries 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['north'] = [
'#type' => 'number',
'#title' => $this
->t('Northern boundary.'),
'#default_value' => $settings['north'],
'#min' => -90,
'#max' => 90,
'#step' => 0.001,
];
$form['east'] = [
'#type' => 'number',
'#title' => $this
->t('Eastern boundary.'),
'#default_value' => $settings['east'],
'#min' => -180,
'#max' => 180,
'#step' => 0.001,
];
$form['south'] = [
'#type' => 'number',
'#title' => $this
->t('Southern boundary.'),
'#default_value' => $settings['south'],
'#min' => -90,
'#max' => 90,
'#step' => 0.001,
];
$form['west'] = [
'#type' => 'number',
'#title' => $this
->t('Western boundary.'),
'#default_value' => $settings['west'],
'#min' => -180,
'#max' => 180,
'#step' => 0.001,
];
return $form;
}