You are here

public function LinkCheckerBatch::batchFinished in Link checker 8

Finished callback for batch.

File

src/LinkCheckerBatch.php, line 145

Class

LinkCheckerBatch
Helper service to handle links checking.

Namespace

Drupal\linkchecker

Code

public function batchFinished($success) {
  if ($success) {
    $this
      ->messenger()
      ->addStatus($this
      ->t('Links were successfully checked.'));
  }
  else {
    $this
      ->messenger()
      ->addError($this
      ->t('Links were not checked.'));
  }
}