You are here

protected function ReadinessTrait::getFailureMessageForSeverity in Automatic Updates 8.2

Gets a message, based on severity, when readiness checkers fail.

Parameters

int $severity: The severity. Should be one of the SystemManager::REQUIREMENT_* constants.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The message.

See also

\Drupal\system\SystemManager::REQUIREMENT_ERROR

\Drupal\system\SystemManager::REQUIREMENT_WARNING

2 calls to ReadinessTrait::getFailureMessageForSeverity()
AdminReadinessMessages::displayResultsForSeverity in src/Validation/AdminReadinessMessages.php
Displays the results for severity.
ReadinessRequirements::createRequirementForSeverity in src/Validation/ReadinessRequirements.php
Creates a requirement for checker results of a specific severity.

File

src/Validation/ReadinessTrait.php, line 26

Class

ReadinessTrait
Common methods for working with readiness checkers.

Namespace

Drupal\automatic_updates\Validation

Code

protected function getFailureMessageForSeverity(int $severity) : TranslatableMarkup {
  return $severity === SystemManager::REQUIREMENT_WARNING ? $this
    ->t('Your site does not pass some readiness checks for automatic updates. Depending on the nature of the failures, it might affect the eligibility for automatic updates.') : $this
    ->t('Your site does not pass some readiness checks for automatic updates. It cannot be automatically updated until further action is performed.');
}