PluginProbe
Disk Usage Insights / 1.3
Disk Usage Insights v1.3
trunk 1.0 1.10 1.11 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
← All changes | src/Frontend/Table.php +1 -20 trunk1.3 View file →
@@ -7,12 +7,10 @@
7 7 private /** @var array */ $columnNames = [];
8 8 private /** @var array */ $columnCss = [];
9 9 private /** @var array */ $percentBar = null; // [$colDisplay, $colSource]
10 10 private /** @var array */ $data = [];
11 - private /** @var array */ $vbarChart = [];
12 - private ?Pagination $pagination = null;
13 11
14 - public function __construct(string $headline, array $columnNames = [], array $columnCss = [])
12 + public function __construct(string $headline, array $columnNames = null, array $columnCss = null)
15 13 {
16 14 $this->headline = $headline;
17 15 if ($columnNames !== null) {
18 16 $this->columnNames = $columnNames;
@@ -29,30 +27,13 @@
29 27 }
30 28
31 29 public function output() {
32 30 $table = $this->data;
33 - $pagination = $this->pagination;
34 31 include __DIR__ . '/../../views/blocks/table.php';
35 32 }
36 33
37 34 public function withPercentBar(int $colDisplay, int $colSource): self {
38 35 $this->percentBar = [$colDisplay, $colSource];
39 -
40 - return $this;
41 - }
42 -
43 - public function withVbarChart(int $colSource): self {
44 - // vbar chart
45 - $this->vbarChart = [];
46 - foreach ($this->data as $row) {
47 - $this->vbarChart[] = floatval($row[$colSource]);
48 - }
49 -
50 - return $this;
51 - }
52 -
53 - public function withPagination(Pagination $pagination): self {
54 - $this->pagination = $pagination;
55 36
56 37 return $this;
57 38 }
58 39