You are here

public function HTMLExporter::__construct in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/HTMLExporter.php \AKlump\LoftDataGrids\HTMLExporter::__construct()

Constructor

Overrides CSVExporter::__construct

1 call to HTMLExporter::__construct()
BootstrapHTMLExporter::__construct in vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/BootstrapHTMLExporter.php
Constructor
1 method overrides HTMLExporter::__construct()
BootstrapHTMLExporter::__construct in vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/BootstrapHTMLExporter.php
Constructor

File

vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/HTMLExporter.php, line 25

Class

HTMLExporter
Class HTMLExporter

Namespace

AKlump\LoftDataGrids

Code

public function __construct(ExportData $data, $filename = '') {
  parent::__construct($data, $filename);
  $this->format = new \stdClass();
  $this->format->bol = "<tr>";
  $this->format->cr = "\n";
  $this->format->eol = "</tr>" . $this->format->cr;
  $this->format->sep = '';
  $this->format->escape = '';
  $this->format->html = TRUE;
  $this->format->snippet = TRUE;
  $this->format->html = '<!DOCTYPE html>

  <html>
  <head>
      <title></title>
      <style type="text/css"></style>
  </head>

  <body></body>
  </html>';
  $this->format->css = 'body {
  font-family: Helvetica, arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  padding-top: 10px;
  padding-bottom: 10px;
  background-color: white;
  padding: 30px; }
caption {
  text-align: left;
  color: #999999;
  font-size: 18px; }
table {
  padding: 0;
  margin-bottom: 30px;
  border-collapse: collapse; }
  table tr {
    border-top: 1px solid #cccccc;
    background-color: white;
    margin: 0;
    padding: 0; }
    table tr:nth-child(2n) {
      background-color: #f8f8f8; }
    table tr th {
      font-weight: bold;
      border: 1px solid #cccccc;
      margin: 0;
      padding: 6px 13px; }
    table tr td {
      border: 1px solid #cccccc;
      margin: 0;
      padding: 6px 13px; }
    table tr th :first-child, table tr td :first-child {
      margin-top: 0; }
    table tr th :last-child, table tr td :last-child {
      margin-bottom: 0; }';
}