public function AccessSettingsPageForm::submitForm in Multiple Registration 8.2
Same name and namespace in other branches
- 3.x src/Form/AccessSettingsPageForm.php \Drupal\multiple_registration\Form\AccessSettingsPageForm::submitForm()
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/ AccessSettingsPageForm.php, line 138
Class
- AccessSettingsPageForm
- Class AccessSettingsPageForm.
Namespace
Drupal\multiple_registration\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$white_list = $form_state
->getValue('multiple_registration_pages_white_list');
$clicked_button = end($form_state
->getTriggeringElement()['#parents']);
switch ($clicked_button) {
case 'save':
$this
->config('multiple_registration.access_settings_page_form_config')
->set('multiple_registration_pages_white_list', $white_list)
->save();
$this->routeBuilder
->rebuild();
$this->cacheRender
->invalidateAll();
break;
}
$form_state
->setRedirect('multiple_registration.multiple_registration_list_index');
}