public function ConfigForm::submitForm in YAML editor 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/ ConfigForm.php, line 62 - Contains Drupal\yaml_editor\Form\ConfigForm.
Class
- ConfigForm
- Class ConfigForm.
Namespace
Drupal\yaml_editor\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$editor_source = $form_state
->getValue('editor_source');
$this
->config('yaml_editor.config')
->set('editor_source', $editor_source)
->save();
parent::submitForm($form, $form_state);
}