public function ModuleConfigureForm::submitForm in Thunder 8.3
Same name and namespace in other branches
- 8.5 src/Installer/Form/ModuleConfigureForm.php \Drupal\thunder\Installer\Form\ModuleConfigureForm::submitForm()
- 8.2 src/Installer/Form/ModuleConfigureForm.php \Drupal\thunder\Installer\Form\ModuleConfigureForm::submitForm()
- 8.4 src/Installer/Form/ModuleConfigureForm.php \Drupal\thunder\Installer\Form\ModuleConfigureForm::submitForm()
- 6.2.x src/Installer/Form/ModuleConfigureForm.php \Drupal\thunder\Installer\Form\ModuleConfigureForm::submitForm()
- 6.0.x src/Installer/Form/ModuleConfigureForm.php \Drupal\thunder\Installer\Form\ModuleConfigureForm::submitForm()
- 6.1.x src/Installer/Form/ModuleConfigureForm.php \Drupal\thunder\Installer\Form\ModuleConfigureForm::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/
Installer/ Form/ ModuleConfigureForm.php, line 116
Class
- ModuleConfigureForm
- Provides the site configuration form.
Namespace
Drupal\thunder\Installer\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$installModules = [];
foreach ($form_state
->getValues() as $key => $value) {
if (strpos($key, 'install_modules') !== FALSE && $value) {
preg_match('/install_modules_(?P<name>\\w+)/', $key, $values);
$installModules[] = $values['name'];
}
}
$buildInfo = $form_state
->getBuildInfo();
$install_state = $buildInfo['args'];
$install_state[0]['thunder_additional_modules'] = $installModules;
$install_state[0]['form_state_values'] = $form_state
->getValues();
$buildInfo['args'] = $install_state;
$form_state
->setBuildInfo($buildInfo);
}