You are here

public function GeofieldWidget::settingsForm in farmOS 2.x

File

modules/core/map/src/Plugin/Field/FieldWidget/GeofieldWidget.php, line 113

Class

GeofieldWidget
Plugin implementation of the map 'geofield' widget.

Namespace

Drupal\farm_map\Plugin\Field\FieldWidget

Code

public function settingsForm(array $form, FormStateInterface $form_state) {
  $elements = parent::settingsForm($form, $form_state);
  $elements['display_raw_geometry'] = [
    '#type' => 'checkbox',
    '#title' => $this
      ->t('Display raw geometry'),
    '#default_value' => $this
      ->getSetting('display_raw_geometry'),
  ];
  $elements['populate_file_field'] = [
    '#type' => 'textfield',
    '#title' => $this
      ->t('File field to populate geometry from.'),
    '#default_value' => $this
      ->getSetting('populate_file_field'),
  ];
  return $elements;
}