Gets the watchdog severity constant corresponding to the CSS class.
string $class: CSS class attribute.
int|null The watchdog severity constant or NULL if not found.
protected function getSeverityConstant($class) {
$map = array_flip(DbLogController::getLogLevelClassMap());
// Find the class that contains the severity.
$classes = explode(' ', $class);
foreach ($classes as $class) {
if (isset($map[$class])) {
return $map[$class];
}
}
return NULL;
}