You are here

protected function BaseUpdateRunner::displayMessage in Scheduled Updates 8

Display message about updates.

Parameters

$update_count:

$invalid_count:

1 call to BaseUpdateRunner::displayMessage()
BaseUpdateRunner::runUpdatesInQueue in src/Plugin/BaseUpdateRunner.php
Run all updates that are in the queue.

File

src/Plugin/BaseUpdateRunner.php, line 365
Contains \Drupal\scheduled_updates\Plugin\BaseUpdateRunner.

Class

BaseUpdateRunner

Namespace

Drupal\scheduled_updates\Plugin

Code

protected function displayMessage($update_count, $invalid_count) {
  $msg = $this
    ->t('Updater @title complete. Results:', [
    '@title' => $this->scheduled_update_type
      ->label(),
  ]);
  if ($update_count) {
    $msg .= ' ' . $this
      ->t('@count update(s) were performed.', [
      '@count' => $update_count,
    ]);
  }
  else {
    $msg .= ' ' . $this
      ->t('No updates were performed.');
  }
  if ($invalid_count) {
    $msg .= ' ' . $this
      ->t('@count updates were invalid', [
      '@count' => $invalid_count,
    ]);
  }
  $this
    ->messenger()
    ->addStatus($msg);
}