diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-11-04 05:30:26 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-11-24 04:04:01 +0300 |
commit | d995029b91f38bd81fbbb50f4d058f3b6b3c18a2 (patch) | |
tree | 3ba63b979bde2da095ddb06bb66fe92b2d72c31b /core/Plugin/Visualization.php | |
parent | f9c851190ed680eb430d9d52040b72c7cf73f62a (diff) |
refs #9129 added feature Custom Dimensions
Diffstat (limited to 'core/Plugin/Visualization.php')
-rw-r--r-- | core/Plugin/Visualization.php | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/Plugin/Visualization.php b/core/Plugin/Visualization.php index 8a35a971b2..fcd8891280 100644 --- a/core/Plugin/Visualization.php +++ b/core/Plugin/Visualization.php @@ -272,7 +272,18 @@ class Visualization extends ViewDataTable $idSite = Common::getRequestVar('idSite', null, 'string', $request); $module = $this->requestConfig->getApiModuleToRequest(); $action = $this->requestConfig->getApiMethodToRequest(); - $metadata = ApiApi::getInstance()->getMetadata($idSite, $module, $action); + + $apiParameters = array(); + $idDimension = Common::getRequestVar('idDimension', 0, 'int'); + $idGoal = Common::getRequestVar('idGoal', 0, 'int'); + if ($idDimension > 0) { + $apiParameters['idDimension'] = $idDimension; + } + if ($idGoal > 0) { + $apiParameters['idGoal'] = $idGoal; + } + + $metadata = ApiApi::getInstance()->getMetadata($idSite, $module, $action, $apiParameters); if (!empty($metadata)) { return array_shift($metadata); |