You are here

public function TileWMS::optionsForm in Openlayers 7.3

@TODO What is this return? If it is the form, why is form by reference?

Overrides Base::optionsForm

File

src/Plugin/Source/TileWMS/TileWMS.php, line 23
Source: TileWMS.

Class

TileWMS
Class TileWMS.

Namespace

Drupal\openlayers\Plugin\Source\TileWMS

Code

public function optionsForm(array &$form, array &$form_state) {
  $form['options']['url'] = array(
    '#type' => 'textarea',
    '#title' => t('Base URL (template)'),
    '#default_value' => $this
      ->getOption('url') ? implode("\n", (array) $this
      ->getOption('url')) : '',
  );
  $form['options']['wms_layers'] = array(
    '#type' => 'textarea',
    '#title' => t('WMS Layers (comma-separated list)'),
    '#default_value' => $this
      ->getOption('wms_layers') ? $this
      ->getOption('wms_layers') : '',
  );
  $form['options']['version'] = array(
    '#type' => 'textfield',
    '#title' => t('Version'),
    '#description' => t('Leave blank to use the Openlayers default.'),
    '#default_value' => $this
      ->getOption('version') ? $this
      ->getOption('version') : '',
  );
}