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

src/Form/MapComponentEditForm.php
<?php

namespace Drupal\openlayers\Form;

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

/**
 * Provides an edit form for ....
 *
 * @internal
 */
class MapComponentEditForm extends MapComponentFormBase {

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state, OpenlayersMapInterface $map = NULL, $component = NULL) {

    $form = parent::buildForm($form, $form_state, $map, $component);
    $form['#title'] = $this->t('Edit %label component', ['%label' => $this->mapComponent->label()]);
    $form['actions']['submit']['#value'] = $this->t('Update component');

    return $form;
  }

  /**
   * {@inheritdoc}
   */
  protected function prepareOpenlayersComponent($component) {
    return $component;
  }
}

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

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