You are here

public function GeolocationMarkerScrollToId::getSettingsForm in Geolocation Field 8.3

Same name and namespace in other branches
  1. 8.2 src/Plugin/geolocation/MapFeature/GeolocationMarkerScrollToId.php \Drupal\geolocation\Plugin\geolocation\MapFeature\GeolocationMarkerScrollToId::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 MapFeatureBase::getSettingsForm

File

src/Plugin/geolocation/MapFeature/GeolocationMarkerScrollToId.php, line 33

Class

GeolocationMarkerScrollToId
Provides map tilt.

Namespace

Drupal\geolocation\Plugin\geolocation\MapFeature

Code

public function getSettingsForm(array $settings, array $parents) {
  $form['scroll_target_id'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Scroll target ID'),
    '#description' => $this
      ->t('ID to scroll to on click. Tokens supported.'),
    '#default_value' => $settings['scroll_target_id'],
  ];
  return $form;
}