You are here

public function SimpleMobileMenuForm::submitForm in Simple Mobile Menu 8

Same name and namespace in other branches
  1. 8.2 src/Form/SimpleMobileMenuForm.php \Drupal\simple_mobile_menu\Form\SimpleMobileMenuForm::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/SimpleMobileMenuForm.php, line 54

Class

SimpleMobileMenuForm
Provides a simple mobile menu settings form.

Namespace

Drupal\simple_mobile_menu\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('simple_mobile_menu.settings')
    ->set('menu_name', $form_state
    ->getValue('menu_name'))
    ->save();
  parent::submitForm($form, $form_state);

  // Theme this form as a config form.
  $form['#theme'] = 'system_config_form';
}