You are here

public function SiteAuditCheckAbstract::getScoreCssClass in Site Audit 7

Same name and namespace in other branches
  1. 8.2 Check/Abstract.php \SiteAuditCheckAbstract::getScoreCssClass()

Get the CSS class associated with a score.

Return value

string Name of the Twitter bootstrap class.

File

Check/Abstract.php, line 122
Contains \SiteAudit\Check\Abstract.

Class

SiteAuditCheckAbstract
Class SiteAuditCheckAbstract.

Code

public function getScoreCssClass() {
  switch ($this->score) {
    case SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS:
      return 'success';
    case SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN:
      return 'warning';
    case SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO:
      return 'info';
    default:
      return 'danger';
  }
}