diff options
author | Stefan Giehl <stefan@piwik.org> | 2017-03-29 11:09:18 +0300 |
---|---|---|
committer | Matthieu Aubry <mattab@users.noreply.github.com> | 2017-03-29 11:09:18 +0300 |
commit | 5d46f802f0485c504c3923aa625032ca998048cf (patch) | |
tree | 6f36e18d37c80dc00bfd2480ee1607b1df9b1fe5 /core/Plugin/Report.php | |
parent | f9c555e5c1ac3bfc49559386f3a7c9d12703a762 (diff) |
Make it possible to disable flattening for an report (#11529)
* use report property to enable/disable flattener
* update tests
* Update changelog [ci skip]
* minor renamings
Diffstat (limited to 'core/Plugin/Report.php')
-rw-r--r-- | core/Plugin/Report.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index 7bdbf0710e..df28f450c9 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -120,6 +120,14 @@ class Report protected $hasGoalMetrics = false; /** + * Set this property to false in case your report can't/shouldn't be flattened. + * In this case, flattener won't be applied even if parameter is provided in a request + * @var bool + * @api + */ + protected $supportsFlatten = true; + + /** * Set it to boolean `true` if your report always returns a constant count of rows, for instance always 24 rows * for 1-24 hours. * @var bool @@ -494,6 +502,15 @@ class Report } /** + * @return bool + * @ignore + */ + public function supportsFlatten() + { + return $this->supportsFlatten; + } + + /** * If the report is enabled the report metadata for this report will be built and added to the list of available * reports. Overwrite this method and leave it empty in case you do not want your report to be added to the report * metadata. In this case your report won't be visible for instance in the mobile app and scheduled reports |