public function SiteAuditReportAbstract::render in Site Audit 7
Same name and namespace in other branches
- 8.2 Report/Abstract.php \SiteAuditReportAbstract::render()
Render the report; respects drush options.
File
- Report/
Abstract.php, line 267 - Contains \SiteAudit\Report\Abstract.
Class
- SiteAuditReportAbstract
- Class SiteAuditReportAbstract.
Code
public function render() {
if (empty($this->checks)) {
return;
}
if (drush_get_option('html')) {
$command = drush_get_command();
if (drush_get_option('bootstrap') && $command['command'] != 'audit_all') {
echo file_get_contents(SITE_AUDIT_BASE_PATH . '/html/header.html');
}
echo $this
->toHtml();
if (drush_get_option('bootstrap') && $command['command'] != 'audit_all') {
echo file_get_contents(SITE_AUDIT_BASE_PATH . '/html/footer.html');
}
}
elseif (drush_get_option('json')) {
echo $this
->toJson();
}
else {
$this
->toDrush();
}
}