function DbLogController::getLogLevelClassMap

Same name in other branches
  1. 9 core/modules/dblog/src/Controller/DbLogController.php \Drupal\dblog\Controller\DbLogController::getLogLevelClassMap()
  2. 10 core/modules/dblog/src/Controller/DbLogController.php \Drupal\dblog\Controller\DbLogController::getLogLevelClassMap()
  3. 11.x core/modules/dblog/src/Controller/DbLogController.php \Drupal\dblog\Controller\DbLogController::getLogLevelClassMap()

Gets an array of log level classes.

Return value

array An array of log level classes.

2 calls to DbLogController::getLogLevelClassMap()
DbLogController::overview in core/modules/dblog/src/Controller/DbLogController.php
Displays a listing of database log messages.
DbLogTest::getSeverityConstant in core/modules/dblog/tests/src/Functional/DbLogTest.php
Gets the watchdog severity constant corresponding to the CSS class.

File

core/modules/dblog/src/Controller/DbLogController.php, line 100

Class

DbLogController
Returns responses for dblog routes.

Namespace

Drupal\dblog\Controller

Code

public static function getLogLevelClassMap() {
    return [
        RfcLogLevel::DEBUG => 'dblog-debug',
        RfcLogLevel::INFO => 'dblog-info',
        RfcLogLevel::NOTICE => 'dblog-notice',
        RfcLogLevel::WARNING => 'dblog-warning',
        RfcLogLevel::ERROR => 'dblog-error',
        RfcLogLevel::CRITICAL => 'dblog-critical',
        RfcLogLevel::ALERT => 'dblog-alert',
        RfcLogLevel::EMERGENCY => 'dblog-emergency',
    ];
}

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