| 1 |
<?php |
| 2 |
namespace Mgleis\DiskUsageInsights\Frontend; |
| 3 |
|
| 4 |
class Table { |
| 5 |
|
| 6 |
private /** @var string */ $headline; |
| 7 |
private /** @var array */ $columnNames = []; |
| 8 |
private /** @var array */ $columnCss = []; |
| 9 |
|
| 10 |
public function __construct(string $headline, array $columnNames = null, array $columnCss = null) |
| 11 |
{ |
| 12 |
$this->headline = $headline; |
| 13 |
if ($columnNames !== null) { |
| 14 |
$this->columnNames = $columnNames; |
| 15 |
} |
| 16 |
if ($columnCss !== null) { |
| 17 |
$this->columnCss = $columnCss; |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
public function output(array $table) { |
| 22 |
include __DIR__ . '/../../views/blocks/table.php'; |
| 23 |
} |
| 24 |
|
| 25 |
} |
| 26 |
|