function StandardHooks::installConfigureSubmit
Submission handler to sync the contact.form.feedback recipient.
Parameters
array $form: Form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current form state.
File
-
core/
profiles/ standard/ src/ Hook/ StandardHooks.php, line 32
Class
- StandardHooks
- Hook implementations for standard.
Namespace
Drupal\standard\HookCode
public function installConfigureSubmit(array $form, FormStateInterface $form_state) : void {
$site_mail = $form_state->getValue('site_mail');
ContactForm::load('feedback')->setRecipients([
$site_mail,
])
->trustData()
->save();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.