function DispatchForm::buildForm

Overrides FormInterface::buildForm

File

tests/modules/rules_test_event/src/Form/DispatchForm.php, line 54

Class

DispatchForm
Acquires input, wraps it in a Task object, and queues it for processing.

Namespace

Drupal\rules_test_event\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
    $form['event'] = [
        '#type' => 'radios',
        '#options' => [
            0 => $this->t('PlainEvent'),
            1 => $this->t('GenericEvent'),
            2 => $this->t('GetterEvent'),
        ],
        '#description' => $this->t('Choose Event to dispatch for testing.'),
    ];
    $form['submit'] = [
        '#type' => 'submit',
        '#value' => 'Dispatch event',
    ];
    return $form;
}