public function Html::render in Site Audit 8.3
Render either one report, or multiple.
Overrides Renderer::render
File
- src/
Renderer/ Html.php, line 186
Class
Namespace
Drupal\site_audit\RendererCode
public function render($detail = FALSE) {
if (is_array($this->report)) {
// There are multiple reports.
foreach ($this->report as $report) {
$this->build['container'][$report
->getPluginId()] = $this
->renderReport($report);
$this->build['container'][$report
->getPluginId()]['top_link'] = [
'#type' => 'html_tag',
'#tag' => 'a',
'#value' => $this
->t('Back to top'),
'#attributes' => [
'href' => '#summary',
],
];
}
}
else {
$this->build['container'][$this->report
->getPluginId()] = $this
->renderReport($this->report);
}
$this
->checkBootstrap();
if ($this->options['inline']) {
// This is being requested as a page, not through CLI.
return $this->build;
}
$out = \Drupal::service('renderer')
->renderRoot($this->build);
return $out;
}