You are here

public function SimpleAdSenseForm::submitForm in Simple AdSense 1.0.x

Same name and namespace in other branches
  1. 8.0 src/Form/SimpleAdSenseForm.php \Drupal\simple_adsense\Form\SimpleAdSenseForm::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/SimpleAdSenseForm.php, line 57

Class

SimpleAdSenseForm
Class SimpleAdSenseForm.

Namespace

Drupal\simple_adsense\Form

Code

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