public function DataPolicySettingsForm::submitForm in Data Policy 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
- src/
Form/ DataPolicySettingsForm.php, line 49
Class
- DataPolicySettingsForm
- Class DataPolicySettingsForm.
Namespace
Drupal\data_policy\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('data_policy.data_policy')
->set('consent_text', $form_state
->getValue('consent_text'))
->save();
parent::submitForm($form, $form_state);
}