batchGet example

if (!$form_state->isSubmitted()) {
      return;
    }

    // Execute form submit handlers.     $this->executeSubmitHandlers($form$form_state);

    // If batches were set in the submit handlers, we process them now,     // possibly ending execution. We make sure we do not react to the batch     // that is already being processed (if a batch operation performs a     // \Drupal\Core\Form\FormBuilderInterface::submitForm).     if ($batch = &$this->batchGet() && !isset($batch['current_set'])) {
      // Store $form_state information in the batch definition.       $batch['form_state'] = $form_state;

      $batch['progressive'] = !$form_state->isProgrammed();
      $response = batch_process();
      // If the batch has been completed and _batch_finished() called then       // $batch will be NULL.       if ($batch && $batch['progressive']) {
        return $response;
      }

      
Home | Imprint | This part of the site doesn't use cookies.