openlayers-8.x-4.x-dev/src/Plugin/Component/SetValues/SetValues.php

src/Plugin/Component/SetValues/SetValues.php
<?php

namespace Drupal\openlayers\Plugin\Component\SetValues;

use Drupal\Core\Form\FormStateInterface;
use Drupal\openlayers\Types\Component;

/**
 * FIX - Insert short comment here.
 *
 * @OpenlayersPlugin(
 *   id = "ol_component_setvalues",
 *   label = @Translation("Set Values"),
 *   description = @Translation("Allows the user to pan the map by using the keyboard."),
 *   service = "openlayers.Component:SetValues",
 *   library = "openlayers-plugin-component-setvalues",
 *   is_configurable = "true",
 *   type = "component"
 * )
 */
class SetValues extends Component {

  /**
   * {@inheritdoc}
   */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {

    $form['options']['latitude'] = array(
      '#type' => 'textfield',
      '#title' => t('Latitude'),
      '#default_value' => $this->getOption('latitude'),
    );
    $form['options']['longitude'] = array(
      '#type' => 'textfield',
      '#title' => t('Longitude'),
      '#default_value' => $this->getOption('longitude'),
    );
    $form['options']['rotation'] = array(
      '#type' => 'textfield',
      '#title' => t('Rotation'),
      '#default_value' => $this->getOption('rotation'),
    );
    $form['options']['zoom'] = array(
      '#type' => 'textfield',
      '#title' => t('Zoom'),
      '#default_value' => $this->getOption('zoom'),
    );
    $form['options']['extent'] = array(
      '#type' => 'textfield',
      '#title' => t('Extent'),
      '#default_value' => $this->getOption('extent'),
    );

    return $form;
  }

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc