public function JsConfigureForm::submitForm in JS Callback Handler 8.3
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/ JsConfigureForm.php, line 57
Class
- JsConfigureForm
- Class JsConfigureForm.
Namespace
Drupal\js\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('js.settings');
$config
->set('endpoint', $form_state
->getValue('endpoint') ?: '/js');
$config
->set('silence_php_errors', $form_state
->getValue('silence_php_errors') ?: FALSE);
$config
->save();
parent::submitForm($form, $form_state);
}