You are here

public function AdminForm::submitForm in UIkit Components 8.3

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

Class

AdminForm
Form builder for the UIkit Components administration form.

Namespace

Drupal\uikit_components\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = \Drupal::service('config.factory')
    ->getEditable('uikit_components.settings');
  $config
    ->set('additional_menu_styles', $form_state
    ->getValue('additional_menu_styles'))
    ->save();

  // For good measure, flush all cache.
  drupal_flush_all_caches();
}