function BatchTestSimpleForm::submitForm
Same name in other branches
- 9 core/modules/system/tests/modules/batch_test/src/Form/BatchTestSimpleForm.php \Drupal\batch_test\Form\BatchTestSimpleForm::submitForm()
- 10 core/modules/system/tests/modules/batch_test/src/Form/BatchTestSimpleForm.php \Drupal\batch_test\Form\BatchTestSimpleForm::submitForm()
- 11.x core/modules/system/tests/modules/batch_test/src/Form/BatchTestSimpleForm.php \Drupal\batch_test\Form\BatchTestSimpleForm::submitForm()
Overrides FormInterface::submitForm
File
-
core/
modules/ system/ tests/ modules/ batch_test/ src/ Form/ BatchTestSimpleForm.php, line 51
Class
- BatchTestSimpleForm
- Generate form of id batch_test_simple_form.
Namespace
Drupal\batch_test\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
batch_test_stack(NULL, TRUE);
foreach ($form_state->getValue('batch') as $batch) {
$function = '_batch_test_' . $batch;
batch_set($function());
}
$form_state->setRedirect('batch_test.redirect');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.