public function SiteAuditCheckViewsCount::calculateScore in Site Audit 7
Same name and namespace in other branches
- 8.2 Check/Views/Count.php \SiteAuditCheckViewsCount::calculateScore()
Implements \SiteAudit\Check\Abstract\calculateScore().
Overrides SiteAuditCheckAbstract::calculateScore
File
- Check/
Views/ Count.php, line 68 - Contains \SiteAudit\Check\Views\Count.
Class
- SiteAuditCheckViewsCount
- Class SiteAuditCheckViewsCount.
Code
public function calculateScore() {
$this->registry['views'] = array();
foreach (views_get_all_views() as $view) {
if ($view->disabled) {
continue;
}
$this->registry['views'][] = $view;
}
if (empty($this->registry['views'])) {
$this->abort = TRUE;
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}