Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-10-28 04:20:33 +0300
committerThomas Steur <thomas.steur@googlemail.com>2014-10-28 04:21:18 +0300
commit13c771ee55252bb8a825f7d8474de7f704ec5fc5 (patch)
treec930a6998103456081b154b59e7b71544ce597de /core/Columns
parentddc01c10703da2c3c6c9644cbc4484012359f2c9 (diff)
refs #6481 in report generator always show the dimensions of the selected plugin even if the plugin is not enabled
Diffstat (limited to 'core/Columns')
-rw-r--r--core/Columns/Dimension.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/Columns/Dimension.php b/core/Columns/Dimension.php
index a6f8831a71..d591cea9db 100644
--- a/core/Columns/Dimension.php
+++ b/core/Columns/Dimension.php
@@ -9,6 +9,7 @@
namespace Piwik\Columns;
use Exception;
+use Piwik\Plugin;
use Piwik\Plugin\ComponentFactory;
use Piwik\Plugin\Dimension\ActionDimension;
use Piwik\Plugin\Dimension\ConversionDimension;
@@ -188,6 +189,25 @@ abstract class Dimension
return $dimensions;
}
+ public static function getDimensions(Plugin $plugin)
+ {
+ $dimensions = array();
+
+ foreach (VisitDimension::getDimensions($plugin) as $dimension) {
+ $dimensions[] = $dimension;
+ }
+
+ foreach (ActionDimension::getDimensions($plugin) as $dimension) {
+ $dimensions[] = $dimension;
+ }
+
+ foreach (ConversionDimension::getDimensions($plugin) as $dimension) {
+ $dimensions[] = $dimension;
+ }
+
+ return $dimensions;
+ }
+
/**
* Creates a Dimension instance from a string ID (see {@link getId()}).
*