3 namespace Drupal\batch_test\Form;
5 use Drupal\Core\Form\FormBase;
6 use Drupal\Core\Form\FormStateInterface;
9 * Generate form of id batch_test_mock_form.
13 class BatchTestMockForm extends FormBase {
18 public function getFormId() {
19 return 'batch_test_mock_form';
25 public function buildForm(array $form, FormStateInterface $form_state) {
26 $form['test_value'] = [
27 '#title' => t('Test value'),
28 '#type' => 'textfield',
32 '#value' => t('Submit'),
41 public function submitForm(array &$form, FormStateInterface $form_state) {
42 batch_test_stack('mock form submitted with value = ' . $form_state->getValue('test_value'));