function DemoUmamiHooks::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/demo_umami/src/Hook/DemoUmamiHooks.php, line 84

Class

DemoUmamiHooks
Hook implementations for demo_umami.

Namespace

Drupal\demo_umami\Hook

Code

public function installConfigureSubmit(array $form, FormStateInterface $form_state) : void {
    $site_mail = $form_state->getValue('site_mail');
    ContactForm::load('feedback')->setRecipients([
        $site_mail,
    ])
        ->trustData()
        ->save();
    $password = $form_state->getValue('account')['pass'];
    $this->setUserPasswords($password);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.