public function AjaxConfigForm::submitForm in Ajax Add to Cart 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/ AjaxConfigForm.php, line 98
Class
- AjaxConfigForm
- Class AjaxConfigForm.
Namespace
Drupal\ajax_add_to_cart\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('ajax_add_to_cart.ajaxconfig')
->set('time_ajax_modal', $form_state
->getValue('time_ajax_modal'))
->set('ajax_modal_width', $form_state
->getValue('ajax_modal_width'))
->set('ajax_modal_height', $form_state
->getValue('ajax_modal_height'))
->save();
}