You are here

public function LeafletMarkerZoomAndAnimate::getSettingsForm in Geolocation Field 8.3

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

modules/geolocation_leaflet/src/Plugin/geolocation/MapFeature/LeafletMarkerZoomAndAnimate.php, line 34

Class

LeafletMarkerZoomAndAnimate
Provides Feature.

Namespace

Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature

Code

public function getSettingsForm(array $settings, array $parents) {
  $form['marker_zoom_anchor_id'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Anchor ID'),
    '#description' => $this
      ->t('Clicking a link with the class "geolocation-marker-zoom" and this anchor target will zoom to the specific marker and animate it. Tokens supported.'),
    '#default_value' => $settings['marker_zoom_anchor_id'],
  ];
  return $form;
}