You are here

protected function AjaxPageControllerBase::report in Forena Reports 8

Render a forena report.

Parameters

string $section: The id of the section where the report goes.

string $report: The name of the report to render.

1 call to AjaxPageControllerBase::report()
AjaxPageControllerBase::modalReport in src/Controller/AjaxPageControllerBase.php
Render a forena report in a modal

File

src/Controller/AjaxPageControllerBase.php, line 537

Class

AjaxPageControllerBase

Namespace

Drupal\forena\Controller

Code

protected function report($section, $report) {

  /** @var Forena $forena */
  $forena = \Drupal::service('forena.reports');
  $content = $forena
    ->report($report, $this->parms);
  if ($this->jsMode != 'nojs' && $this->jsMode != 'drupal_modal') {
    $this->commands[] = new HtmlCommand('#' . $section, $content);
  }
  else {
    $this->build[$section] = $content;
  }
}