Ejemplo n.º 1
0
Archivo: table.php Proyecto: stgnet/pui
 public function asHtml($level)
 {
     /* add tags JIT */
     $columns = $this->columns_from_table($this->table_content);
     $this->add($this->thead_from_columns($columns));
     $tbody = new Tbody();
     foreach ($this->table_content as $index => $row) {
         $tr = new Tr();
         foreach ($row as $column => $data) {
             $td = new Td($data);
             $tr->Add($td);
         }
         $tbody->Add($tr);
     }
     $this->add($tbody);
     return parent::asHtml($level);
 }