You are here

public function RendererBase::generate in Forena Reports 8

Generate the template from the configuration.

Parameters

string $data_block:

\SimpleXMLElement $xml:

array $config:

File

src/FrxPlugin/Renderer/RendererBase.php, line 795
FrxRenderer.php Base class for FrxAPI custom Renderer @author davidmetzler

Class

RendererBase
Crosstab Renderer

Namespace

Drupal\forena\FrxPlugin\Renderer

Code

public function generate($xml, &$config) {
  if (!@$config['foreach']) {
    $config['foreach'] = '*';
  }
  $columns = $this
    ->columns($xml);
  $text = '';
  if ($columns) {
    foreach ($columns as $col => $label) {
      $text .= ' {' . $col . '}';
    }
  }
  $this
    ->blockDiv($config, $text);
}