contact_form_user_admin_settings_submit

contact_form_user_admin_settings_submit($form, FormStateInterface $form_state)

Form submission handler for user_admin_settings().

See also

contact_form_user_admin_settings_alter()

File

core/modules/contact/contact.module, line 228
Enables the use of personal and site-wide contact forms.

Code

function contact_form_user_admin_settings_submit($form, FormStateInterface $form_state) {
  \Drupal::configFactory()->getEditable('contact.settings')
    ->set('user_default_enabled', $form_state->getValue('contact_default_status'))
    ->save();
}
doc_Drupal
2016-10-29 08:56:32
Comments
Leave a Comment

Please login to continue.