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-02-28 07:20:41 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-02-28 07:20:41 +0400
commit3055a6571d93272d72a5eb3201bf797577c63488 (patch)
tree7c88f98495655758e9c122e2e65eb79102e809af /plugins/Insights/Insights.php
parentdb6199d21047c042ca337f7a86b314a81a0488d2 (diff)
refs #57 started to work on displaying Insights. Added a widget for the dashboard and a new Insights visualization. More to come... still early version so expect a lot of things to change but I am still happy about feedback
Diffstat (limited to 'plugins/Insights/Insights.php')
-rw-r--r--plugins/Insights/Insights.php44
1 files changed, 44 insertions, 0 deletions
diff --git a/plugins/Insights/Insights.php b/plugins/Insights/Insights.php
new file mode 100644
index 0000000000..b8c7a549d2
--- /dev/null
+++ b/plugins/Insights/Insights.php
@@ -0,0 +1,44 @@
+<?php
+/**
+ * Piwik - Open source web analytics
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ *
+ */
+namespace Piwik\Plugins\Insights;
+
+use Piwik\WidgetsList;
+
+/**
+ */
+class Insights extends \Piwik\Plugin
+{
+ /**
+ * @see Piwik\Plugin::getListHooksRegistered
+ */
+ public function getListHooksRegistered()
+ {
+ return array(
+ 'WidgetsList.addWidgets' => 'addWidgets',
+ 'AssetManager.getJavaScriptFiles' => 'getJsFiles',
+ 'ViewDataTable.addViewDataTable' => 'getAvailableVisualizations'
+ );
+ }
+
+ public function getAvailableVisualizations(&$visualizations)
+ {
+ $visualizations[] = __NAMESPACE__ . '\\Visualizations\\Insight';
+ }
+
+ public function addWidgets()
+ {
+ WidgetsList::add('Insights_Category', 'Insights_OverviewWidgetTitle', 'Insights', 'getOverviewMoversAndShakers');
+ }
+
+ public function getJsFiles(&$jsFiles)
+ {
+ $jsFiles[] = "plugins/Insights/javascripts/insightsDataTable.js";
+ }
+
+}