You are here

public function TwitterFeedConfigForm::submitForm in Twitter_Feed 8

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/TwitterFeedConfigForm.php, line 90

Class

TwitterFeedConfigForm
Class TwitterFeedConfigForm.

Namespace

Drupal\twitter_feed\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('twitter_feed.settings')
    ->set('twitter_feed_api_key', $form_state
    ->getValue('twitter_feed_api_key'))
    ->set('twitter_feed_api_secret', $form_state
    ->getValue('twitter_feed_api_secret'))
    ->set('twitter_feed_jquery_timeago_locale', $form_state
    ->getValue('twitter_feed_jquery_timeago_locale'))
    ->save();
}