You are here

public function ShortenKeysForm::submitForm in Shorten URLs 8

Same name and namespace in other branches
  1. 8.2 src/Form/ShortenKeysForm.php \Drupal\shorten\Form\ShortenKeysForm::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

src/Form/ShortenKeysForm.php, line 87

Class

ShortenKeysForm
Keys Page.

Namespace

Drupal\shorten\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $this
    ->config('shorten.settings')
    ->set('shorten_bitly_login', $values['shorten_bitly_login'])
    ->set('shorten_bitly_key', $values['shorten_bitly_key'])
    ->set('shorten_budurl', $values['shorten_budurl'])
    ->set('shorten_cligs', $values['shorten_cligs'])
    ->set('shorten_ez', $values['shorten_ez'])
    ->set('shorten_fwd4me', $values['shorten_fwd4me'])
    ->set('shorten_googl', $values['shorten_googl'])
    ->set('shorten_redirec', $values['shorten_redirec'])
    ->save();
}