You are here

public function ControlCustomLoadingIndicator::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_google_maps/src/Plugin/geolocation/MapFeature/ControlCustomLoadingIndicator.php, line 32

Class

ControlCustomLoadingIndicator
Provides Recenter control element.

Namespace

Drupal\geolocation_google_maps\Plugin\geolocation\MapFeature

Code

public function getSettingsForm(array $settings, array $parents) {
  $form = parent::getSettingsForm($settings, $parents);
  $settings = array_replace_recursive(self::getDefaultSettings(), $settings);
  $form['loading_label'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Label'),
    '#description' => $this
      ->t('Shown during loading.'),
    '#default_value' => $settings['loading_label'],
  ];
  return $form;
}