You are here

public function IpStack::getSettingsForm in Geolocation Field 8.3

Settings form by ID and context.

Parameters

int $location_option_id: Location option ID.

array $settings: The current option settings.

mixed $context: Current context.

Return value

array A form array to be integrated in whatever.

Overrides LocationBase::getSettingsForm

File

src/Plugin/geolocation/Location/IpStack.php, line 31

Class

IpStack
Fixed coordinates map center.

Namespace

Drupal\geolocation\Plugin\geolocation\Location

Code

public function getSettingsForm($option_id = NULL, array $settings = [], $context = NULL) {
  $settings = $this
    ->getSettings($settings);
  $form['access_key'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('Access Key'),
    '#default_value' => $settings['access_key'],
    '#size' => 60,
    '#maxlength' => 128,
  ];
  return $form;
}