public function AdsenseOldSearchSettings::submitForm in Google AdSense integration 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
- oldcode/
src/ Form/ AdsenseOldSearchSettings.php, line 273
Class
- AdsenseOldSearchSettings
- Form for the older adsense search ads settings.
Namespace
Drupal\adsense_oldcode\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->configFactory()
->getEditable('adsense_oldcode.settings');
$form_state
->cleanValues();
foreach ($form_state
->getValues() as $key => $value) {
$config
->set($key, Html::escape($value));
}
$config
->save();
parent::submitForm($form, $form_state);
}