public function BigPipeTestForm::buildForm in Drupal 10
Same name and namespace in other branches
- 8 core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php \Drupal\big_pipe_test\Form\BigPipeTestForm::buildForm()
- 9 core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php \Drupal\big_pipe_test\Form\BigPipeTestForm::buildForm()
Form constructor.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array The form structure.
Overrides FormInterface::buildForm
File
- core/
modules/ big_pipe/ tests/ modules/ big_pipe_test/ src/ Form/ BigPipeTestForm.php, line 25
Class
- BigPipeTestForm
- Form to test BigPipe.
Namespace
Drupal\big_pipe_test\FormCode
public function buildForm(array $form, FormStateInterface $form_state) {
$form['#token'] = FALSE;
$form['big_pipe'] = [
'#type' => 'checkboxes',
'#title' => $this
->t('BigPipe works…'),
'#options' => [
'js' => $this
->t('… with JavaScript'),
'nojs' => $this
->t('… without JavaScript'),
],
];
return $form;
}