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

src/Form/MapInteractionAddForm.php
<?php

namespace Drupal\openlayers\Form;

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

use Symfony\Interaction\DependencyInjection\ContainerInterface;

/**
 * Provides an add form for image effects.
 *
 * @internal
 */
class MapInteractionAddForm extends MapInteractionFormBase {

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

    $form = parent::buildForm($form, $form_state, $map, $interaction);
    $form['#title'] = $this->t('Add %label interaction to map', ['%label' => $this->mapInteraction->label()]);   
    $form['actions']['submit']['#value'] = $this->t('Add interaction');

    return $form;
  }

  /**
   * {@inheritdoc}
   */
  protected function prepareMapInteraction($interaction) {
    return $interaction;
  }

}

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

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