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:
authorsgiehl <stefan@piwik.org>2015-01-12 21:53:04 +0300
committersgiehl <stefan@piwik.org>2015-01-12 21:53:04 +0300
commit037c64e3faccae9392712660aa1958c2c34ce493 (patch)
tree0536820f4d845a63b9ac9e59e3a3a2397da52569 /core/Plugin/Report.php
parenta0b8ddbde4dffdcc597687ace203e8d8d4f238d4 (diff)
refs #6928 - set fixed view type for visitor log
Diffstat (limited to 'core/Plugin/Report.php')
-rw-r--r--core/Plugin/Report.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/Plugin/Report.php b/core/Plugin/Report.php
index 64a0ce603b..2bb87bde3a 100644
--- a/core/Plugin/Report.php
+++ b/core/Plugin/Report.php
@@ -271,6 +271,16 @@ class Report
}
/**
+ * Returns if the default viewDataTable type is fixed. e.g. the type won't be changeable through config or url params.
+ * Defaults to false
+ * @return bool
+ */
+ public function isDefaultTypeFixed()
+ {
+ return false;
+ }
+
+ /**
* Here you can configure how your report should be displayed and which capabilities your report has. For instance
* whether your report supports a "search" or not. EG `$view->config->show_search = false`. You can also change the
* default request config. For instance you can change how many rows are displayed by default:
@@ -302,7 +312,11 @@ class Report
$apiAction = $apiProxy->buildApiActionName($this->module, $this->action);
- $view = ViewDataTableFactory::build(null, $apiAction, $this->module . '.' . $this->action);
+ if ($this->isDefaultTypeFixed()) {
+ $view = ViewDataTableFactory::build($this->getDefaultTypeViewDataTable(), $apiAction, $this->module . '.' . $this->action, true);
+ } else {
+ $view = ViewDataTableFactory::build(null, $apiAction, $this->module . '.' . $this->action);
+ }
$rendered = $view->render();
return $rendered;