You are here

public function ConfigForm::submitForm in Rest menu items 8.2

Same name and namespace in other branches
  1. 3.0.x src/Form/ConfigForm.php \Drupal\rest_menu_items\Form\ConfigForm::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/ConfigForm.php, line 83

Class

ConfigForm
Class ConfigForm.

Namespace

Drupal\rest_menu_items\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('rest_menu_items.config')
    ->set('output_values', $form_state
    ->getValue('output_values'))
    ->set('base_url', $form_state
    ->getValue('base_url'))
    ->set('add_fragment', $form_state
    ->getValue('add_fragment'))
    ->save();
}