
| Current Path : /var/www/html/strat/web/core/modules/system/tests/modules/batch_test/src/Form/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/strat/web/core/modules/system/tests/modules/batch_test/src/Form/BatchTestMockForm.php |
<?php
namespace Drupal\batch_test\Form;
use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
/**
* Generate form of id batch_test_mock_form.
*
* @internal
*/
class BatchTestMockForm extends FormBase {
/**
* {@inheritdoc}
*/
public function getFormId() {
return 'batch_test_mock_form';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
$form['test_value'] = [
'#title' => t('Test value'),
'#type' => 'textfield',
];
$form['submit'] = [
'#type' => 'submit',
'#value' => t('Submit'),
];
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
batch_test_stack('mock form submitted with value = ' . $form_state->getValue('test_value'));
}
}