You are here

protected function AdminReadinessMessages::displayResultsOnCurrentPage in Automatic Updates 8.2

Determines whether the messages should be displayed on the current page.

Return value

bool Whether the messages should be displayed on the current page.

1 call to AdminReadinessMessages::displayResultsOnCurrentPage()
AdminReadinessMessages::displayAdminPageMessages in src/Validation/AdminReadinessMessages.php
Displays the checker results messages on admin pages.

File

src/Validation/AdminReadinessMessages.php, line 129

Class

AdminReadinessMessages
Class for displaying readiness messages on admin pages.

Namespace

Drupal\automatic_updates\Validation

Code

protected function displayResultsOnCurrentPage() : bool {
  if ($this->adminContext
    ->isAdminRoute() && $this->currentUser
    ->hasPermission('administer site configuration')) {

    // These routes don't need additional nagging.
    $disabled_routes = [
      'update.theme_update',
      'system.theme_install',
      'update.module_update',
      'update.module_install',
      'update.status',
      'update.report_update',
      'update.report_install',
      'update.settings',
      'system.status',
      'update.confirmation_page',
    ];
    return !in_array($this->currentRouteMatch
      ->getRouteName(), $disabled_routes, TRUE);
  }
  return FALSE;
}