You are here

function private_message_user_admin_settings_submit in Private Message 8

Submit handler, saves alterations to private message emails.

See also

private_message_form_user_admin_settings_alter()

\Drupal\user\ProfileForm

1 string reference to 'private_message_user_admin_settings_submit'
private_message_form_user_admin_settings_alter in ./private_message.module
Implements hook_form_FORM_ID_alter().

File

./private_message.module, line 441
Contains hooks for the private message module.

Code

function private_message_user_admin_settings_submit(array &$form, FormStateInterface $form_state) {
  \Drupal::service('config.factory')
    ->getEditable('private_message.mail')
    ->set('message_notification.subject', $form_state
    ->getValue([
    'email_private_message',
    'settings',
    'user_mail_private_message_notification_subject',
  ]))
    ->set('message_notification.body', $form_state
    ->getValue([
    'email_private_message',
    'settings',
    'user_mail_private_message_notification_body',
  ]))
    ->save();
}