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:
Diffstat (limited to 'modules/PluginsFunctions/Widget.php')
-rw-r--r--modules/PluginsFunctions/Widget.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/PluginsFunctions/Widget.php b/modules/PluginsFunctions/Widget.php
new file mode 100644
index 0000000000..65e90d84fa
--- /dev/null
+++ b/modules/PluginsFunctions/Widget.php
@@ -0,0 +1,18 @@
+<?php
+
+Piwik_AddAction('Menu', 'Piwik_BuildMenu');
+
+static $widgets = array();
+
+function Piwik_GetListWidgets()
+{
+ global $widgets;
+ return $widgets;
+}
+
+function Piwik_AddWidget( $pluginName, $controllerMethodToCall, $widgetTitle )
+{
+ global $widgets;
+ // get the plugin name from controller
+ $widgets[$pluginName][] = array( $widgetTitle, $controllerMethodToCall );
+}