function BatchTestChainedForm::batchTestChainedFormSubmit1

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php \Drupal\batch_test\Form\BatchTestChainedForm::batchTestChainedFormSubmit1()
  2. 8.9.x core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php \Drupal\batch_test\Form\BatchTestChainedForm::batchTestChainedFormSubmit1()
  3. 10 core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php \Drupal\batch_test\Form\BatchTestChainedForm::batchTestChainedFormSubmit1()

Form submission handler #1 for batch_test_chained_form.

File

core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php, line 59

Class

BatchTestChainedForm
Generate form of id batch_test_chained_form.

Namespace

Drupal\batch_test\Form

Code

public static function batchTestChainedFormSubmit1($form, FormStateInterface $form_state) {
  $batch_test_definitions = new BatchTestDefinitions();
  $batch_test_helper = new BatchTestHelper();
  $batch_test_helper->stack(NULL, TRUE);
  $batch_test_helper->stack('submit handler 1');
  $batch_test_helper->stack('value = ' . $form_state->getValue('value'));
  $value =& $form_state->getValue('value');
  $value++;
  batch_set($batch_test_definitions->batch1());
  $form_state->setRedirect('batch_test.redirect');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.