public function OpenlayersInteractionPluginAddForm::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/ OpenlayersInteractionPluginAddForm.php, line 47
Class
- OpenlayersInteractionPluginAddForm
- Provides an add form for the settings for Openlayers plugins.
Namespace
Drupal\openlayers\FormCode
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;
}