public function SimpleAdSenseForm::submitForm in Simple AdSense 8.0
Same name and namespace in other branches
- 1.0.x 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\FormCode
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();
}