Skip to content
BatchTestMockForm.php 846 B
Newer Older
<?php

namespace Drupal\batch_test\Form;

use Drupal\Core\Form\FormBase;

/**
 * Generate form of id batch_test_mock_form.
 */
class BatchTestMockForm extends FormBase {

  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'batch_test_mock_form';
  }

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
      '#title' => t('Test value'),
      '#type' => 'textfield',
  public function submitForm(array &$form, FormStateInterface $form_state) {
    batch_test_stack('mock form submitted with value = ' . $form_state->getValue('test_value'));