You are here

public function WebformSubmissionsDeleteFormBase::batchFinish in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Form/WebformSubmissionsDeleteFormBase.php \Drupal\webform\Form\WebformSubmissionsDeleteFormBase::batchFinish()

Batch API callback; Completed deletion.

Parameters

bool $success: TRUE if batch successfully completed.

array $results: Batch results.

array $operations: An array of function calls (not used in this function).

File

src/Form/WebformSubmissionsDeleteFormBase.php, line 231

Class

WebformSubmissionsDeleteFormBase
Base webform for deleting webform submission.

Namespace

Drupal\webform\Form

Code

public function batchFinish($success = FALSE, array $results = [], array $operations = []) {
  if (!$success) {
    $this
      ->messenger()
      ->addStatus($this
      ->t('Finished with an error.'));
  }
  else {
    $this
      ->messenger()
      ->addStatus($this
      ->getFinishedMessage());
  }
}