You are here

public function Icon::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/Style/Icon/Icon.php, line 22
Style: Icon.

Class

Icon
Class Icon.

Namespace

Drupal\openlayers\Plugin\Style\Icon

Code

public function optionsForm(array &$form, array &$form_state) {
  $form['options']['path'] = array(
    '#type' => 'textfield',
    '#title' => 'Path',
    '#default_value' => $this
      ->getOption('path', ''),
  );
  $form['options']['scale'] = array(
    '#type' => 'textfield',
    '#title' => 'Scale',
    '#default_value' => $this
      ->getOption('scale', ''),
  );
  $form['options']['anchor'][0] = array(
    '#type' => 'textfield',
    '#title' => 'Anchor X',
    '#default_value' => $this
      ->getOption(array(
      'anchor',
      0,
    ), 0.5),
  );
  $form['options']['anchor'][1] = array(
    '#type' => 'textfield',
    '#title' => 'Anchor Y',
    '#default_value' => $this
      ->getOption(array(
      'anchor',
      1,
    ), 0.5),
  );
}