function ForumSettingsForm::submitForm

Same name and namespace in other branches
  1. 9 core/modules/forum/src/ForumSettingsForm.php \Drupal\forum\ForumSettingsForm::submitForm()
  2. 8.9.x core/modules/forum/src/ForumSettingsForm.php \Drupal\forum\ForumSettingsForm::submitForm()
  3. 10 core/modules/forum/src/ForumSettingsForm.php \Drupal\forum\ForumSettingsForm::submitForm()

Overrides ConfigFormBase::submitForm

File

core/modules/forum/src/ForumSettingsForm.php, line 71

Class

ForumSettingsForm
Configure forum settings for this site.

Namespace

Drupal\forum

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
    $this->config('forum.settings')
        ->set('topics.hot_threshold', $form_state->getValue('forum_hot_topic'))
        ->set('topics.page_limit', $form_state->getValue('forum_per_page'))
        ->set('topics.order', $form_state->getValue('forum_order'))
        ->save();
    parent::submitForm($form, $form_state);
}

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