openlayers-8.x-4.x-dev/src/Form/MapControlEditForm.php

src/Form/MapControlEditForm.php
<?php

namespace Drupal\openlayers\Form;

use Drupal\Core\Form\FormStateInterface;
use Drupal\openlayers\OpenlayersMapInterface;
//use Drupal\openlayers\OpenlayersControlInterface;

/**
 * Provides an edit form for ....
 *
 * @internal
 */
class MapControlEditForm extends MapControlFormBase {

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state, OpenlayersMapInterface $map = NULL, $control = NULL) {
    $form = parent::buildForm($form, $form_state, $map, $control);
    $form['#title'] = $this->t('Edit %label control', ['%label' => $this->mapControl->label()]);
    $form['actions']['submit']['#value'] = $this->t('Update control');

    return $form;
  }

  /**
   * {@inheritdoc}
   */
  protected function prepareOpenlayersControl($control) {
    return $control;
  }
}

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

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