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:
authormattpiwik <matthieu.aubry@gmail.com>2008-02-01 07:17:22 +0300
committermattpiwik <matthieu.aubry@gmail.com>2008-02-01 07:17:22 +0300
commitc1ae555bb033504e2e77ba36a31b83b39024314e (patch)
tree9fd69eb676110fdce58b1a794170d4e3a5a2126e /plugins/VisitorInterest/Controller.php
parent7b92137c4a8ef29f80652b6599553cca18436830 (diff)
finished splitting HomeController in all the plugins controller
git-svn-id: http://dev.piwik.org/svn/trunk@257 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'plugins/VisitorInterest/Controller.php')
-rw-r--r--plugins/VisitorInterest/Controller.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/plugins/VisitorInterest/Controller.php b/plugins/VisitorInterest/Controller.php
new file mode 100644
index 0000000000..80f9a03c60
--- /dev/null
+++ b/plugins/VisitorInterest/Controller.php
@@ -0,0 +1,53 @@
+<?php
+
+require_once "ViewDataTable.php";
+class Piwik_VisitorInterest_Controller extends Piwik_Controller
+{
+ function index()
+ {
+ $view = new Piwik_View('VisitorInterest/index.tpl');
+
+ /* Visitor Interest */
+ $view->dataTableNumberOfVisitsPerVisitDuration = $this->getNumberOfVisitsPerVisitDuration(true);
+ $view->dataTableNumberOfVisitsPerPage = $this->getNumberOfVisitsPerPage(true);
+
+ echo $view->render();
+ }
+
+ /**
+ * VisitorInterest
+ */
+ function getNumberOfVisitsPerVisitDuration( $fetch = false)
+ {
+ $view = Piwik_ViewDataTable::factory( null, 'cloud' );
+ $view->init( $this->pluginName, __FUNCTION__,
+ "VisitorInterest.getNumberOfVisitsPerVisitDuration" );
+
+ $view->setColumnsToDisplay( array(0,1) );
+ $view->disableSort();
+ $view->disableExcludeLowPopulation();
+ $view->disableOffsetInformation();
+ $view->disableSearchBox();
+
+ return $this->renderView($view, $fetch);
+ }
+
+ function getNumberOfVisitsPerPage( $fetch = false)
+ {
+ $view = Piwik_ViewDataTable::factory();
+ $view->init( $this->pluginName, __FUNCTION__,
+ "VisitorInterest.getNumberOfVisitsPerPage" );
+
+ $view->setColumnsToDisplay( array(0,1) );
+ $view->setSortedColumn( 'nb_visits' );
+ $view->disableExcludeLowPopulation();
+ $view->disableOffsetInformation();
+ $view->disableSearchBox();
+ $view->disableSort();
+ $view->main();
+
+ return $this->renderView($view, $fetch);
+ }
+
+
+}