public function SettingsForm::submitForm in uLogin (advanced version) 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 486
Class
- SettingsForm
- Settings form.
Namespace
Drupal\ulogin\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('ulogin.settings');
foreach ($form_state
->getValues() as $key => $value) {
if (strpos($key, 'ulogin_') !== FALSE) {
$config
->set(str_replace('ulogin_', '', $key), $value);
}
}
$config
->save();
drupal_set_message(t('Configuration was saved.'));
}