You are here

public function ReadinessCheckerController::run in Automatic Updates 8

Run the readiness checkers.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse A redirect

1 string reference to 'ReadinessCheckerController::run'
automatic_updates.routing.yml in ./automatic_updates.routing.yml
automatic_updates.routing.yml

File

src/Controller/ReadinessCheckerController.php, line 51

Class

ReadinessCheckerController
Class ReadinessCheckerController.

Namespace

Drupal\automatic_updates\Controller

Code

public function run() {
  $messages = [];
  foreach ($this->checker
    ->getCategories() as $category) {
    $messages[] = $this->checker
      ->run($category);
  }
  $messages = array_merge(...$messages);
  if (empty($messages)) {
    $this
      ->messenger()
      ->addStatus($this
      ->t('No issues found. Your site is ready for <a href="@readiness_checks">automatic updates</a>.', [
      '@readiness_checks' => 'https://www.drupal.org/docs/8/update/automatic-updates#readiness-checks',
    ]));
  }
  return $this
    ->redirect('automatic_updates.settings');
}