public function Lightbox2SlideshowSettingsForm::submitForm in Lightbox2 8
Same name in this branch
- 8 src/Lightbox2SlideshowSettingsForm.php \Drupal\lightbox2\Lightbox2SlideshowSettingsForm::submitForm()
- 8 src/Form/Lightbox2SlideshowSettingsForm.php \Drupal\lightbox2\Form\Lightbox2SlideshowSettingsForm::submitForm()
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/ Lightbox2SlideshowSettingsForm.php, line 26 - Contains \Drupal\lightbox2\Form\Lightbox2SlideshowSettingsForm.
Class
Namespace
Drupal\lightbox2\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('lightbox2.settings');
foreach (Element::children($form) as $variable) {
$config
->set($variable, $form_state
->getValue($form[$variable]['#parents']));
}
$config
->save();
if (method_exists($this, '_submitForm')) {
$this
->_submitForm($form, $form_state);
}
parent::submitForm($form, $form_state);
}