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@gmail.com>2013-10-17 08:29:32 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-10-17 08:29:32 +0400
commitaf9e2cfb105080b516dfb67a145095aac21cd98a (patch)
tree5d7cf97f1e26dae110345563c3613abaa4d64998 /plugins/VisitorInterest/VisitorInterest.php
parent2883f98ee800c1fc7ac44ad14765bd7dbcff5c6a (diff)
define the default view type in a separate event
Diffstat (limited to 'plugins/VisitorInterest/VisitorInterest.php')
-rw-r--r--plugins/VisitorInterest/VisitorInterest.php22
1 files changed, 14 insertions, 8 deletions
diff --git a/plugins/VisitorInterest/VisitorInterest.php b/plugins/VisitorInterest/VisitorInterest.php
index 4225f5cfc3..ca009b8fd9 100644
--- a/plugins/VisitorInterest/VisitorInterest.php
+++ b/plugins/VisitorInterest/VisitorInterest.php
@@ -16,6 +16,7 @@ use Piwik\FrontController;
use Piwik\Menu\MenuMain;
use Piwik\Metrics;
use Piwik\Piwik;
+use Piwik\Plugins\CoreVisualizations\Visualizations\Cloud;
use Piwik\WidgetsList;
/**
@@ -30,12 +31,13 @@ class VisitorInterest extends \Piwik\Plugin
public function getListHooksRegistered()
{
$hooks = array(
- 'ArchiveProcessor.Day.compute' => 'archiveDay',
- 'ArchiveProcessor.Period.compute' => 'archivePeriod',
- 'WidgetsList.addWidgets' => 'addWidgets',
- 'Menu.Reporting.addItems' => 'addMenu',
- 'API.getReportMetadata' => 'getReportMetadata',
- 'Visualization.getReportDisplayProperties' => 'getReportDisplayProperties',
+ 'ArchiveProcessor.Day.compute' => 'archiveDay',
+ 'ArchiveProcessor.Period.compute' => 'archivePeriod',
+ 'WidgetsList.addWidgets' => 'addWidgets',
+ 'Menu.Reporting.addItems' => 'addMenu',
+ 'API.getReportMetadata' => 'getReportMetadata',
+ 'Visualization.getReportDisplayProperties' => 'getReportDisplayProperties',
+ 'Visualization.getDefaultViewTypeForReports' => 'getDefaultViewTypeForReports'
);
return $hooks;
}
@@ -151,6 +153,12 @@ class VisitorInterest extends \Piwik\Plugin
$out .= '</div>';
}
+ public function getDefaultViewTypeForReports(&$defaultViewTypes)
+ {
+ $defaultViewTypes['VisitorInterest.getNumberOfVisitsPerVisitDuration'] = Cloud::ID;
+ $defaultViewTypes['VisitorInterest.getNumberOfVisitsPerPage'] = Cloud::ID;
+ }
+
public function getReportDisplayProperties(&$properties)
{
$properties['VisitorInterest.getNumberOfVisitsPerVisitDuration'] =
@@ -166,7 +174,6 @@ class VisitorInterest extends \Piwik\Plugin
private function getDisplayPropertiesForGetNumberOfVisitsPerVisitDuration()
{
return array(
- 'default_view_type' => 'cloud',
'filter_sort_column' => 'label',
'filter_sort_order' => 'asc',
'translations' => array('label' => Piwik::translate('VisitorInterest_ColumnVisitDuration')),
@@ -188,7 +195,6 @@ class VisitorInterest extends \Piwik\Plugin
private function getDisplayPropertiesForGetNumberOfVisitsPerPage()
{
return array(
- 'default_view_type' => 'cloud',
'filter_sort_column' => 'label',
'filter_sort_order' => 'asc',
'translations' => array('label' => Piwik::translate('VisitorInterest_ColumnPagesPerVisit')),