public function Location::getSettingsForm in Geolocation Field 8.2
Same name in this branch
- 8.2 src/Plugin/geolocation/MapCenter/Location.php \Drupal\geolocation\Plugin\geolocation\MapCenter\Location::getSettingsForm()
- 8.2 src/Plugin/geolocation/LocationInput/Location.php \Drupal\geolocation\Plugin\geolocation\LocationInput\Location::getSettingsForm()
Same name and namespace in other branches
- 8.3 src/Plugin/geolocation/MapCenter/Location.php \Drupal\geolocation\Plugin\geolocation\MapCenter\Location::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/ Location.php, line 54
Class
- Location
- Location based map center.
Namespace
Drupal\geolocation\Plugin\geolocation\MapCenterCode
public function getSettingsForm($option_id = NULL, array $settings = [], $context = NULL) {
if (!$this->locationManager
->hasDefinition($option_id)) {
return [];
}
/** @var \Drupal\geolocation\LocationInterface $location_plugin */
$location_plugin = $this->locationManager
->createInstance($option_id);
$form = $location_plugin
->getSettingsForm($location_plugin
->getPluginId(), $settings, $context);
return $form;
}