You are here

public function MapLayerDeleteForm::buildForm in Openlayers 8.4

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides ConfirmFormBase::buildForm

File

src/Form/MapLayerDeleteForm.php, line 63

Class

MapLayerDeleteForm
Form for deleting a layer from a map.

Namespace

Drupal\openlayers\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, OpenlayersMapInterface $map = NULL, $layer = NULL) {
  $this->olMap = $map;
  $this->mapLayer = new MapLayer($this->olMap->layers[$layer], 'delete');
  return parent::buildForm($form, $form_state);
}