You are here

protected function SensorDrupalUpdate::getStatusText in Monitoring 7

Gets status text.

Parameters

int $status: One of UPDATE_* constants.

Return value

string Status text.

2 calls to SensorDrupalUpdate::getStatusText()
SensorDrupalUpdate::checkContrib in lib/Drupal/monitoring/Sensor/Sensors/SensorDrupalUpdate.php
Checks contrib status and sets sensor status message.
SensorDrupalUpdate::checkCore in lib/Drupal/monitoring/Sensor/Sensors/SensorDrupalUpdate.php
Checks core status and sets sensor status message.

File

lib/Drupal/monitoring/Sensor/Sensors/SensorDrupalUpdate.php, line 128
Contains \Drupal\monitoring\Sensor\Sensors\SensorDrupalUpdate.

Class

SensorDrupalUpdate
Monitors for available updates of Drupal core and installed contrib modules.

Namespace

Drupal\monitoring\Sensor\Sensors

Code

protected function getStatusText($status) {
  switch ($status) {
    case UPDATE_NOT_SECURE:
      return 'NOT SECURE';
      break;
    case UPDATE_CURRENT:
      return 'current';
      break;
    case UPDATE_REVOKED:
      return 'version revoked';
      break;
    case UPDATE_NOT_SUPPORTED:
      return 'not supported';
      break;
    case UPDATE_NOT_CURRENT:
      return 'update available';
      break;
    case UPDATE_UNKNOWN:
    case UPDATE_NOT_CHECKED:
    case UPDATE_NOT_FETCHED:
    case UPDATE_FETCH_PENDING:
      return 'unknown';
      break;
  }
}