You are here

public function LeafletControlAttribution::getSettingsForm in Geolocation Field 8.3

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 ControlElementBase::getSettingsForm

File

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

Class

LeafletControlAttribution
Provides Attribution control element.

Namespace

Drupal\geolocation_leaflet\Plugin\geolocation\MapFeature

Code

public function getSettingsForm(array $settings, array $parents) {
  $form = parent::getSettingsForm($settings, $parents);
  $form['prefix'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Prefix'),
    '#description' => $this
      ->t('The HTML text shown before the attributions.'),
    '#default_value' => $settings['prefix'],
  ];
  return $form;
}