public function NodejsConfigForm::submitForm in Node.js integration 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/ NodejsConfigForm.php, line 100
Class
- NodejsConfigForm
- Configure node.js integration.
Namespace
Drupal\nodejs\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->configFactory
->getEditable('nodejs.config')
->set('nodejs.scheme', $form_state
->getValue('scheme'))
->set('nodejs.host', $form_state
->getValue('host'))
->set('nodejs.port', $form_state
->getValue('port'))
->set('client.scheme', $form_state
->getValue('client_scheme'))
->set('client.host', $form_state
->getValue('client_host'))
->set('client.port', $form_state
->getValue('client_port'))
->set('pages', $form_state
->getValue('pages'))
->set('service_key', $form_state
->getValue('service_key'))
->save();
parent::submitForm($form, $form_state);
}