You are here

public function GeocoderProviderCreationForm::submitForm in Geocoder 8.3

Form submission handler.

Parameters

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

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

Overrides FormInterface::submitForm

File

src/Form/GeocoderProviderCreationForm.php, line 132

Class

GeocoderProviderCreationForm
Provides a simple form that allows to select the provider type.

Namespace

Drupal\geocoder\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) : void {
  if ($form_state
    ->getValue('geocoder_provider')) {
    $form_state
      ->setRedirect('entity.geocoder_provider.add_form', [
      'geocoder_provider_id' => $form_state
        ->getValue('geocoder_provider'),
    ]);
  }
}