function BasicSettingsForm::submitForm

Same name in other branches
  1. 9 core/modules/views_ui/src/Form/BasicSettingsForm.php \Drupal\views_ui\Form\BasicSettingsForm::submitForm()

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.