You are here

public function OpenlayersControlPluginAddForm::buildForm in Openlayers 8.4

Parameters

\Drupal\image\ImageStyleInterface $image_style: The openlayers map.

string $image_effect: The openlayers plugin ID.

Return value

array The form structure.

Throws

\Symfony\Component\HttpKernel\Exception\NotFoundHttpException

Overrides OpenlayersPluginFormBase::buildForm

File

src/Form/OpenlayersControlPluginAddForm.php, line 47

Class

OpenlayersControlPluginAddForm
Provides an add form for the settings for Openlayers plugins.

Namespace

Drupal\openlayers\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, OpenlayersMapInterface $map = NULL, $plugin_type = NULL, $plugin = NULL) {
  $form = parent::buildForm($form, $form_state, $map, $plugin_type, $plugin);
  $form['#title'] = $this
    ->t('Edit %label %type', [
    '%label' => $this->olPlugin
      ->label(),
    '%type' => $plugin_type,
  ]);
  $form['actions']['submit']['#value'] = $this
    ->t('Add plugin settings');
  return $form;
}