Added filtration for errors by severity and plugin. Issue #85.

This commit is contained in:
Dmitry Khomutov 2017-10-29 21:26:43 +07:00
commit 42888630e7
No known key found for this signature in database
GPG key ID: EC19426474B37AAC
8 changed files with 253 additions and 36 deletions

View file

@ -401,6 +401,30 @@ class BuildError extends Model
}
}
/**
* Get the language string key for this error's severity level.
*
* @param integer $severity
*
* @return string
*/
public static function getSeverityName($severity)
{
switch ($severity) {
case self::SEVERITY_CRITICAL:
return 'critical';
case self::SEVERITY_HIGH:
return 'high';
case self::SEVERITY_NORMAL:
return 'normal';
case self::SEVERITY_LOW:
return 'low';
}
}
/**
* Get the class to apply to HTML elements representing this error.
*