You are here

public function PerfmonRunForm::buildForm in Performance monitor 8

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

src/Form/PerfmonRunForm.php, line 20

Class

PerfmonRunForm

Namespace

Drupal\perfmon\Form

Code

public function buildForm(array $form, FormStateInterface $form_state, $tests = NULL) {
  $form['run_form'] = array(
    '#type' => 'fieldset',
    '#title' => t('Run'),
    '#description' => $this
      ->t('Click the button below to run the performance testlist and review the results.'),
    '#collapsible' => TRUE,
    '#collapsed' => empty($tests) ? FALSE : TRUE,
  );
  $form['run_form']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Run testlist'),
  );
  return $form;
}