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

src/Form/MapLayerAddForm.php
<?php

namespace Drupal\openlayers\Form;

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

use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Provides an add form for image effects.
 *
 * @internal
 */
class MapLayerAddForm extends MapLayerFormBase {

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

    return $form;
  }

  /**
   * {@inheritdoc}
   */
  protected function prepareOpenlayersLayer($layer) {

    return $layer;
  }

}

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

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