You are here

public function SettingsForm::submitForm in Bulk User Registration 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

src/Form/SettingsForm.php, line 61

Class

SettingsForm
Configure locale settings for this site.

Namespace

Drupal\bulk_user_registration\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $config = $this
    ->config('bulk_user_registration.settings');
  $config
    ->set('allowed_roles', $values['allowed_roles'])
    ->save();
  parent::submitForm($form, $form_state);
}