function BatchTestChainedForm::buildForm
Same name in other branches
- 9 core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php \Drupal\batch_test\Form\BatchTestChainedForm::buildForm()
- 10 core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php \Drupal\batch_test\Form\BatchTestChainedForm::buildForm()
- 11.x core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php \Drupal\batch_test\Form\BatchTestChainedForm::buildForm()
Overrides FormInterface::buildForm
File
-
core/
modules/ system/ tests/ modules/ batch_test/ src/ Form/ BatchTestChainedForm.php, line 25
Class
- BatchTestChainedForm
- Generate form of id batch_test_chained_form.
Namespace
Drupal\batch_test\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
// This value is used to test that $form_state persists through batched
// submit handlers.
$form['value'] = [
'#type' => 'textfield',
'#title' => 'Value',
'#default_value' => 1,
];
$form['submit'] = [
'#type' => 'submit',
'#value' => 'Submit',
];
$form['#submit'] = [
'Drupal\\batch_test\\Form\\BatchTestChainedForm::batchTestChainedFormSubmit1',
'Drupal\\batch_test\\Form\\BatchTestChainedForm::batchTestChainedFormSubmit2',
'Drupal\\batch_test\\Form\\BatchTestChainedForm::batchTestChainedFormSubmit3',
'Drupal\\batch_test\\Form\\BatchTestChainedForm::batchTestChainedFormSubmit4',
];
return $form;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.