You are here

class FrxFieldTable in Forena Reports 7.3

Same name and namespace in other branches
  1. 6.2 templates/FrxFieldTable.inc \FrxFieldTable
  2. 7.2 templates/FrxFieldTable.inc \FrxFieldTable
  3. 7.4 renderers/FrxFieldTable.inc \FrxFieldTable

Hierarchy

Expanded class hierarchy of FrxFieldTable

1 string reference to 'FrxFieldTable'
FrxFieldTable::generate in templates/FrxFieldTable.inc
Enter description here ...

File

templates/FrxFieldTable.inc, line 7

View source
class FrxFieldTable extends FrxTemplate {
  public function generate($xml, $config) {
    $config['foreach'] = '*';
    $config['class'] = 'FrxFieldTable';
    $div = $this
      ->blockDiv($config);
    $columns = $this
      ->columns($xml);
    $table = $this
      ->addNode($div, 4, 'table', NULL, NULL, NULL);
    $r = 0;
    if ($columns) {
      foreach ($columns as $col) {
        $r++;
        $tbody = $this
          ->addNode($table, 6, 'tbody');
        $tr = $this
          ->addNode($tbody, 8, 'tr');
        $th = $this
          ->addNode($tr, 10, 'th', $col);
        if ($r == 1) {
          $th
            ->setAttribute('width', '300');
        }
        $td = $this
          ->addNode($tr, 10, 'td', '{' . $col . '}');
      }
    }
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FrxFieldTable::generate public function Enter description here ... Overrides FrxTemplate::generate
FrxTemplate::$body public property
FrxTemplate::$columns public property
FrxTemplate::$document_root public property
FrxTemplate::$doc_prefix public property
FrxTemplate::$dom public property
FrxTemplate::$simplexml public property
FrxTemplate::$xmlns public property
FrxTemplate::addNode function
FrxTemplate::addText function
FrxTemplate::asXML public function
FrxTemplate::blockDiv public function Generate generic div tag.
FrxTemplate::columns public function
FrxTemplate::config_form public function Returns the section Enter description here ... 2
FrxTemplate::extract public function Extract a configuration var removing it from the array
FrxTemplate::idFromBlock public function
FrxTemplate::template public function
FrxTemplate::__construct public function