diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2018-12-07 05:28:25 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2018-12-07 05:28:25 +0300 |
commit | 53c4d95a4b60ee099400db8c36ac64a68ffa37a3 (patch) | |
tree | 1a6918e045fb9d5a6fe35531854be98faafeb86f /core/DataTable.php | |
parent | 6eb10a35e6388c62b88d77edc5055daa519de32d (diff) |
Some work on report totals (#13555)
* some work on totals
* fix graphs
* tweak rendering of totals row
* disable evolution for totals row
* let plugins configure totals row visibility
* remove metadata
* more tweaks and make it configurable
* improve code and performance
* fix some tests
* lots of improvements
* support bandwidth and other plugins
* fix tests
* add screenshot test
* also fix existing test
* add new method supportsTotalRow
* various fixes
* Updating some expected test files.
Diffstat (limited to 'core/DataTable.php')
-rw-r--r-- | core/DataTable.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/DataTable.php b/core/DataTable.php index b14281938c..2f546d2905 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -197,6 +197,7 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess /** The original label of the Summary Row. */ const LABEL_SUMMARY_ROW = -1; + const LABEL_TOTALS_ROW = -2; /** * Name for metadata that contains extra {@link Piwik\Plugin\ProcessedMetric}s for a DataTable. @@ -302,6 +303,11 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess protected $summaryRow = null; /** + * @var \Piwik\DataTable\Row + */ + protected $totalsRow = null; + + /** * Table metadata. Read [this](#class-desc-the-basics) to learn more. * * Any data that describes the data held in the table's rows should go here. @@ -402,6 +408,16 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess } } + public function setTotalsRow(Row $totalsRow) + { + $this->totalsRow = $totalsRow; + } + + public function getTotalsRow() + { + return $this->totalsRow; + } + /** * Returns the name of the column this table was sorted by (if any). * @@ -1868,6 +1884,11 @@ class DataTable implements DataTableInterface, \IteratorAggregate, \ArrayAccess $this->queuedFilters = array(); } + public function getQueuedFilters() + { + return $this->queuedFilters; + } + /** * @return \ArrayIterator|Row[] */ |