public function SettingsForm::submitForm in Ajax form entity 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/ SettingsForm.php, line 302 - Contains \Drupal\ajax_form_entity\Form\ExampleConfigForm.
Class
- SettingsForm
- Class SettingsForm.
Namespace
Drupal\ajax_form_entity\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('ajax_form_entity.settings');
$config
->set('content', $form_state
->getValue('content'));
$config
->save();
}