You are here

function genpass_user_admin_settings_submit in Generate Password 8

Save admin settings for this module.

1 string reference to 'genpass_user_admin_settings_submit'
genpass_form_alter in ./genpass.module
Implements hook_form_alter().

File

./genpass.module, line 232
Contains genpass.module.

Code

function genpass_user_admin_settings_submit($form, FormStateInterface $form_state) {
  \Drupal::configFactory()
    ->getEditable('genpass.settings')
    ->set('genpass_length', $form_state
    ->getValue('genpass_length'))
    ->set('genpass_mode', $form_state
    ->getValue('genpass_mode'))
    ->set('genpass_display', $form_state
    ->getValue('genpass_display'))
    ->set('genpass_algorithm', $form_state
    ->getValue('genpass_algorithm'))
    ->save();
}