/** * Prepares tr th html * * @return string */ protected function prepareHeaders() { $result = NULL; foreach ($this->getColumns() as $name) { if (count($this->visible_columns)) { if (!in_array($name, $this->visible_columns)) { continue; } } $header = $this->getHeader($name); if ($header instanceof Column or $header instanceof Th) { $this->importFromColumn($header, $name); $result .= $header->render(); } else { if ($column = $this->getColumn($name)) { $column->setData($header); $column->setHeader(); } else { $column = Th::create($header); } $result .= $column->render(); } } return "<tr class='header'>{$result}</tr>\n"; }