public function SiteAuditReportAbstract::getPercentCssClass in Site Audit 7
Same name and namespace in other branches
- 8.2 Report/Abstract.php \SiteAuditReportAbstract::getPercentCssClass()
Get the CSS class associated with a percentage.
Return value
string Twitter Bootstrap CSS class.
1 call to SiteAuditReportAbstract::getPercentCssClass()
- SiteAuditReportAbstract::toHtml in Report/
Abstract.php - Render response as HTML; does not include head, body, etc.
File
- Report/
Abstract.php, line 305 - Contains \SiteAudit\Report\Abstract.
Class
- SiteAuditReportAbstract
- Class SiteAuditReportAbstract.
Code
public function getPercentCssClass() {
if ($this->percent > 80) {
return 'success';
}
if ($this->percent > 65) {
return 'warning';
}
if ($this->percent >= 0) {
return 'danger';
}
return 'info';
}