function insight_ca_report_to_insight_report in Insight 7
1 call to insight_ca_report_to_insight_report()
File
- ./
insight.module, line 764
Code
function insight_ca_report_to_insight_report($context, $analysis, $analyzer, $report) {
//dsm($report_defs);
//dsm($analysis);
$analysis += array(
'#score' => NULL,
'#help' => NULL,
'#data' => NULL,
);
$status = NULL;
if (isset($analysis['#status'])) {
$status = 2;
if ($analysis['#status'] == 'warning') {
$status = 1;
}
else {
if ($analysis['#status'] == 'error') {
$status = 0;
}
}
}
$a = array(
$analyzer => $analysis,
);
$b = contentanalysis_build_analysis_content($a);
$output = '<style> .contentanalysis-report-tabs { display: none; } </style>';
$output .= '<div class="analysis-results" style="margin: 0 0 0 0;"><div class="analyzer-analysis" style="display: block;">' . $b[$analyzer]['output'] . '</div></div>';
$report = array(
'name' => $report,
'nid' => $context['nid'],
'path' => $context['path'],
'status' => $status,
'score' => $analysis['#score'],
'help' => $analysis['#help'],
'report' => $output,
'data' => $analysis['#data'],
);
return $report;
}