You are here

public function FrxTemplate::generate in Forena Reports 7.2

Same name and namespace in other branches
  1. 6.2 templates/FrxTemplate.inc \FrxTemplate::generate()
  2. 7.3 templates/FrxTemplate.inc \FrxTemplate::generate()

* * Enter description here ... *

Parameters

string $data_block: * @param SimpleXMLElement $xml * @param array $config

5 methods override FrxTemplate::generate()
FrxEmailMerge::generate in templates/FrxEmailMerge.inc
* * Enter description here ... *
FrxFieldTable::generate in templates/FrxFieldTable.inc
* * Enter description here ... *
FrxGraphTemplate::generate in templates/FrxGraphTemplate.inc
* * Enter description here ... *
FrxRptInclude::generate in templates/FrxRptInclude.inc
* * Enter description here ... *
FrxTable::generate in templates/FrxTable.inc
* * Enter description here ... *

File

templates/FrxTemplate.inc, line 185

Class

FrxTemplate

Code

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