Version 1
[yaffs-website] / web / core / modules / big_pipe / tests / modules / big_pipe_test / src / Form / BigPipeTestForm.php
diff --git a/web/core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php b/web/core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php
new file mode 100644 (file)
index 0000000..c56ee32
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\big_pipe_test\Form;
+
+use Drupal\Core\Form\FormBase;
+use Drupal\Core\Form\FormStateInterface;
+
+class BigPipeTestForm extends FormBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormId() {
+    return 'big_pipe_test_form';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  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;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function submitForm(array &$form, FormStateInterface $form_state) { }
+
+}