You are here

public function ProcessTestSamplesForm::submitForm in Module Builder 8.3

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ProcessForm::submitForm

File

module_builder_devel/src/Form/ProcessTestSamplesForm.php, line 54

Class

ProcessTestSamplesForm
Form for updating DCB's test sample analysis data.

Namespace

Drupal\module_builder_devel\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {

  // Safe to do this without exception handling: it's already been checked in
  // the form builder.
  $task_handler_collect = static::getCollectTask();
  $job_list = $task_handler_collect
    ->getJobList();

  // No need to use a batch, the job list is much smaller.
  $results = [];
  $task_handler_collect
    ->collectComponentDataIncremental($job_list, $results);
  $this
    ->messenger()
    ->addStatus(t("Finished analysing code for the test sample data."));
}