You are here

public function MenuSelectConfigForm::submitForm in Menu Select 8

Same name and namespace in other branches
  1. 2.0.x src/Form/MenuSelectConfigForm.php \Drupal\menu_select\Form\MenuSelectConfigForm::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/MenuSelectConfigForm.php, line 66

Class

MenuSelectConfigForm
Controller for Menu Select config form.

Namespace

Drupal\menu_select\Form

Code

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