public function CertificateConfigForm::submitForm in Certificate 4.x
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/ CertificateConfigForm.php, line 105
Class
- CertificateConfigForm
- Class CertificateConfigForm.
Namespace
Drupal\certificate\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('certificate.settings');
$form_state
->cleanValues();
$vals = $form_state
->getValues();
foreach ($vals as $key => $value) {
$config
->set($key, $value);
}
$config
->save();
parent::submitForm($form, $form_state);
}