public function AjaxLinksApiSettingsForm::submitForm in Ajaxify Drupal with JQuery Ajax 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/ AjaxLinksApiSettingsForm.php, line 62
Class
- AjaxLinksApiSettingsForm
- Displays the Ajax links API settings form.
Namespace
Drupal\ajax_links_api\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
\Drupal::configFactory()
->getEditable('ajax_links_api.admin_settings')
->set('ajax_links_api.trigger', $values['ajax_links_api_trigger'])
->set('ajax_links_api.selector', $values['ajax_links_api_selector'])
->set('ajax_links_api.html5', $values['ajax_links_api_html5'])
->set('ajax_links_api.scripts_included', $values['ajax_links_api_scripts_included'])
->set('ajax_links_api.vpager', $values['ajax_links_api_vpager'])
->save();
return parent::submitForm($form, $form_state);
}