public static function RavenConfigForm::submitForm in Raven: Sentry Integration 8.2
Same name and namespace in other branches
- 8 src/Form/RavenConfigForm.php \Drupal\raven\Form\RavenConfigForm::submitForm()
- 3.x src/Form/RavenConfigForm.php \Drupal\raven\Form\RavenConfigForm::submitForm()
Submits Raven config form.
File
- src/
Form/ RavenConfigForm.php, line 184
Class
- RavenConfigForm
- Implements a Raven Config form.
Namespace
Drupal\raven\FormCode
public static function submitForm(array &$form, FormStateInterface $form_state) {
\Drupal::configFactory()
->getEditable('raven.settings')
->set('client_key', $form_state
->getValue([
'raven',
'php',
'client_key',
]))
->set('fatal_error_handler', $form_state
->getValue([
'raven',
'php',
'fatal_error_handler',
]))
->set('fatal_error_handler_memory', $form_state
->getValue([
'raven',
'php',
'fatal_error_handler_memory',
]))
->set('drush_error_handler', $form_state
->getValue([
'raven',
'php',
'drush_error_handler',
]))
->set('log_levels', $form_state
->getValue([
'raven',
'php',
'log_levels',
]))
->set('stack', $form_state
->getValue([
'raven',
'php',
'stack',
]))
->set('timeout', $form_state
->getValue([
'raven',
'php',
'timeout',
]))
->set('message_limit', $form_state
->getValue([
'raven',
'php',
'message_limit',
]))
->set('trace', $form_state
->getValue([
'raven',
'php',
'trace',
]))
->set('ssl', $form_state
->getValue([
'raven',
'php',
'ssl',
]))
->set('ca_cert', $form_state
->getValue([
'raven',
'php',
'ca_cert',
]))
->set('ignored_channels', array_map('trim', preg_split('/\\R/', $form_state
->getValue([
'raven',
'php',
'ignored_channels',
]), -1, PREG_SPLIT_NO_EMPTY)))
->set('javascript_error_handler', $form_state
->getValue([
'raven',
'js',
'javascript_error_handler',
]))
->set('public_dsn', $form_state
->getValue([
'raven',
'js',
'public_dsn',
]))
->set('browser_traces_sample_rate', $form_state
->getValue([
'raven',
'js',
'browser_traces_sample_rate',
]))
->set('auto_session_tracking', $form_state
->getValue([
'raven',
'js',
'auto_session_tracking',
]))
->set('send_client_reports', $form_state
->getValue([
'raven',
'js',
'send_client_reports',
]))
->set('environment', $form_state
->getValue([
'raven',
'environment',
]))
->set('release', $form_state
->getValue([
'raven',
'release',
]))
->save();
}