You are here

public function BasicSettingsForm::submitForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views_ui/src/Form/BasicSettingsForm.php \Drupal\views_ui\Form\BasicSettingsForm::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

core/modules/views_ui/src/Form/BasicSettingsForm.php, line 174

Class

BasicSettingsForm
Form builder for the admin display defaults page.

Namespace

Drupal\views_ui\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('views.settings')
    ->set('ui.show.master_display', $form_state
    ->getValue('ui_show_master_display'))
    ->set('ui.show.advanced_column', $form_state
    ->getValue('ui_show_advanced_column'))
    ->set('ui.show.display_embed', $form_state
    ->getValue('ui_show_display_embed'))
    ->set('ui.exposed_filter_any_label', $form_state
    ->getValue('ui_exposed_filter_any_label'))
    ->set('ui.always_live_preview', $form_state
    ->getValue('ui_always_live_preview'))
    ->set('ui.show.preview_information', $form_state
    ->getValue('ui_show_preview_information'))
    ->set('ui.show.sql_query.where', $form_state
    ->getValue('ui_show_sql_query_where'))
    ->set('ui.show.sql_query.enabled', $form_state
    ->getValue('ui_show_sql_query_enabled'))
    ->set('ui.show.performance_statistics', $form_state
    ->getValue('ui_show_performance_statistics'))
    ->set('ui.show.additional_queries', $form_state
    ->getValue('ui_show_additional_queries'))
    ->save();
  parent::submitForm($form, $form_state);
}