You are here

public function RssFeedsForm::submitForm in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/system/src/Form/RssFeedsForm.php \Drupal\system\Form\RssFeedsForm::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/system/src/Form/RssFeedsForm.php, line 66

Class

RssFeedsForm
Configure RSS settings for this site

Namespace

Drupal\system\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this
    ->config('system.rss')
    ->set('channel.description', $form_state
    ->getValue('feed_description'))
    ->set('items.limit', $form_state
    ->getValue('feed_default_items'))
    ->set('items.view_mode', $form_state
    ->getValue('feed_view_mode'))
    ->save();
  parent::submitForm($form, $form_state);
}