public function IpLanguageNegotiationForm::submitForm in IP Language Negotiation 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 FormInterface::submitForm
File
- src/
Form/ IpLanguageNegotiationForm.php, line 91
Class
- IpLanguageNegotiationForm
- IP language negotiation form.
Namespace
Drupal\ip_language_negotiation\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Exclude unnecessary elements.
$form_state
->cleanValues();
\Drupal::configFactory()
->getEditable('ip_language_negotiation.settings')
->set('ip_language_negotiation_countries', $form_state
->getValues())
->save();
}