public function JanrainCaptureSettingsForm::submitForm in Janrain 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/ JanrainCaptureSettingsForm.php, line 179
Class
- JanrainCaptureSettingsForm
- Janrain Capture settings form.
Namespace
Drupal\janrain_capture\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$capture = $form_state
->getValue('capture');
$this->configFactory
->getEditable('janrain_capture.settings')
->set('capture.app_id', $capture['app_id'])
->set('capture.client_id', $capture['client_id'])
->set('capture.client_secret', $capture['client_secret'])
->set('capture.load_js_url', $capture['load_js_url'])
->set('capture.providers', array_keys(array_filter($capture['providers']['list'])))
->set('capture.capture_server', $capture['capture_server'])
->set('capture.app_url', $capture['engage']['app_url'])
->set('capture.token_action', $capture['engage']['token_action'])
->set('capture.enable_sso', $capture['federate']['enable_sso'])
->set('capture.federate_server', $capture['federate']['federate_server'])
->set('capture.federate_segment', $capture['federate']['federate_segment'])
->set('capture.federate_supported_segments', $capture['federate']['federate_supported_segments'])
->save();
}