diff options
author | diosmosis <benaka@piwik.pro> | 2014-09-19 21:03:27 +0400 |
---|---|---|
committer | diosmosis <benaka@piwik.pro> | 2014-09-19 21:03:27 +0400 |
commit | 1ad956d65c6eb49c3d6b192d0adac9ce33aa0989 (patch) | |
tree | 5680fd36af37b2aa9b8e22f1a86bd61aa11348a0 /core | |
parent | eebd6dc7b5ee585fd5fffd2eb85b11a52babb9f7 (diff) |
Add public Report::isSubtableReport() method so it can be used in closure on PHP 5.3.
Diffstat (limited to 'core')
-rw-r--r-- | core/Plugin/Report.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php index a907b0f709..6d950babd2 100644 --- a/core/Plugin/Report.php +++ b/core/Plugin/Report.php @@ -602,6 +602,16 @@ class Report } /** + * Returns true if the report is for another report's subtable, false if otherwise. + * + * @return bool + */ + public function isSubtableReport() + { + return $this->isSubtableReport; + } + + /** * Fetches the report represented by this instance. * * @param array $paramOverride Query parameter overrides. @@ -722,7 +732,7 @@ class Report public static function getForDimension(Dimension $dimension) { return ComponentFactory::getComponentIf(__CLASS__, $dimension->getModule(), function (Report $report) use ($dimension) { - return !$report->isSubtableReport + return !$report->isSubtableReport() && $report->getDimension() && $report->getDimension()->getId() == $dimension->getId(); }); |