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-08 07:20:09 +0400
committerThomas Steur <thomas.steur@gmail.com>2013-10-08 07:20:09 +0400
commit3f39037b271208f458131a08a45ce1d841b176fd (patch)
tree1332d6b5ac68126612a1b5e037a2f55d40b43e58 /core/WidgetsList.php
parent9bfd1ae2fefcb896b46573de64b62a7fc5980f8f (diff)
refs #4199 documented some more events
Diffstat (limited to 'core/WidgetsList.php')
-rw-r--r--core/WidgetsList.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/core/WidgetsList.php b/core/WidgetsList.php
index 01ac7f5178..40c531721c 100644
--- a/core/WidgetsList.php
+++ b/core/WidgetsList.php
@@ -38,7 +38,6 @@ class WidgetsList
static public function get()
{
self::addWidgets();
- Piwik_PostEvent('WidgetsList.getWidgets');
uksort(self::$widgets, array('Piwik\WidgetsList', '_sortWidgetCategories'));
@@ -56,6 +55,20 @@ class WidgetsList
{
if (!self::$hookCalled) {
self::$hookCalled = true;
+
+ /**
+ * This event is triggered to collect all available widgets. Subscribe to this event if you want to create
+ * one or more custom widgets. It's fairly easy. Just define the name of your widgets as well as a
+ * controller and an action that should be executed once your widget is requested.
+ *
+ * Example:
+ * ```
+ * public function addWidgets()
+ * {
+ * WidgetsList::add('General_Actions', 'General_Pages', 'Actions', 'getPageUrls');
+ * }
+ * ```
+ */
Piwik_PostEvent('WidgetsList.addWidgets');
}
}