public function renderTable(TableContent $content) { $templates = array('widths' => $content->getTableWidths(), 'as_totals_box' => $content->getAsTotalsBox(), 'num_columns' => $content->getNumColumns(), 'data' => $content->getData(), 'headers' => $content->getHeaders(), 'auto_totals' => $content->getAutoTotals(), 'types' => $content->getDataTypes()); if ($templates['auto_totals']) { $templates['totals'] = $content->getTotals(); } $this->markup .= TemplateEngine::render(__DIR__ . '/html_templates/table.tpl', $templates); }