You are here

public function MarkerOpacity::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 MapFeatureBase::getSettingsForm

File

modules/geolocation_google_maps/src/Plugin/geolocation/MapFeature/MarkerOpacity.php, line 32

Class

MarkerOpacity
Provides Google Maps.

Namespace

Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature

Code

public function getSettingsForm(array $settings, array $parents) {
  $form['opacity'] = [
    '#type' => 'number',
    '#title' => $this
      ->t('Opacity'),
    '#step' => 0.01,
    '#min' => 0,
    '#max' => 1,
    '#description' => $this
      ->t('1 = solid, 0 = invisible'),
    '#default_value' => $settings['opacity'],
  ];
  return $form;
}