function StatusReport::getSeverities

Gets the severities.

Return value

array An associative array of the requirements severities. The keys are the requirement constants defined in install.inc.

Deprecated

in drupal:11.2.0 and is removed from drupal:12.0.0. There is no replacement.

See also

https://www.drupal.org/node/3410939

1 call to StatusReport::getSeverities()
LegacyStatusReportTest::testGetSeveritiesDeprecation in core/tests/Drupal/KernelTests/Core/Render/Element/LegacyStatusReportTest.php
Tests the getSeverities() method deprecation.

File

core/lib/Drupal/Core/Render/Element/StatusReport.php, line 78

Class

StatusReport
Creates status report page element.

Namespace

Drupal\Core\Render\Element

Code

public static function getSeverities() {
  @trigger_error('Calling ' . __METHOD__ . '() is deprecated in drupal:11.2.0 and is removed from in drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3410939', \E_USER_DEPRECATED);
  return [
    RequirementSeverity::Info->value => [
      'title' => t('Checked', [], [
        'context' => 'Examined',
      ]),
      'status' => 'checked',
    ],
    RequirementSeverity::OK->value => [
      'title' => t('OK'),
      'status' => 'ok',
    ],
    RequirementSeverity::Warning->value => [
      'title' => t('Warnings found'),
      'status' => 'warning',
    ],
    RequirementSeverity::Error->value => [
      'title' => t('Errors found'),
      'status' => 'error',
    ],
  ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.