You are here

public function SettingsForm::submitForm in Single Language URL Prefix 8

Same name and namespace in other branches
  1. 2.0.x src/Form/SettingsForm.php \Drupal\single_language_url_prefix\Form\SettingsForm::submitForm()

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 ConfigFormBase::submitForm

File

src/Form/SettingsForm.php, line 54

Class

SettingsForm
Class SettingsForm

Namespace

Drupal\single_language_url_prefix\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->configFactory()
    ->getEditable('single_language_url_prefix.settings');
  $config
    ->set('excluded_paths', $form_state
    ->getValue('excluded_paths'));
  $config
    ->save();
  parent::submitForm($form, $form_state);
}