BigPipeTestForm.php

Same filename in other branches
  1. 8.9.x core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php
  2. 10 core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php
  3. 11.x core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php

Namespace

Drupal\big_pipe_test\Form

File

core/modules/big_pipe/tests/modules/big_pipe_test/src/Form/BigPipeTestForm.php

View source
<?php

namespace Drupal\big_pipe_test\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Form to test BigPipe.
 *
 * @internal
 */
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) {
    }

}

Classes

Title Deprecated Summary
BigPipeTestForm Form to test BigPipe.

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