You are here

public function Photon::getOptionsForm in Geolocation Field 8.2

Same name and namespace in other branches
  1. 8.3 modules/geolocation_leaflet/src/Plugin/geolocation/Geocoder/Photon.php \Drupal\geolocation_leaflet\Plugin\geolocation\Geocoder\Photon::getOptionsForm()

Return additional options form.

Return value

array Options form.

Overrides GeocoderBase::getOptionsForm

File

modules/geolocation_leaflet/src/Plugin/geolocation/Geocoder/Photon.php, line 44

Class

Photon
Provides the Photon.

Namespace

Drupal\geolocation_leaflet\Plugin\geolocation\Geocoder

Code

public function getOptionsForm() {
  $settings = $this
    ->getSettings();
  $form = parent::getOptionsForm();
  $form['location_priority'] = [
    '#type' => 'geolocation_input',
    '#title' => $this
      ->t('Location Priority'),
    '#default_value' => [
      'lat' => $settings['location_priority']['lat'],
      'lng' => $settings['location_priority']['lng'],
    ],
  ];
  return $form;
}