public function ContentLanguageAccessAdminForm::submitForm in Content Language Access 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/ ContentLanguageAccessAdminForm.php, line 24
Class
- ContentLanguageAccessAdminForm
- Administration form for content language access module.
Namespace
Drupal\content_language_access\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('content_language_access.settings');
foreach (Element::children($form['content_language_access']) as $group) {
foreach (Element::children($form['content_language_access'][$group]) as $variable) {
$config
->set($variable, (bool) $form_state
->getValue($variable));
}
}
$config
->save();
parent::submitForm($form, $form_state);
}