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 'plugins/ExampleUI/ExampleUI.php')
-rw-r--r--plugins/ExampleUI/ExampleUI.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/plugins/ExampleUI/ExampleUI.php b/plugins/ExampleUI/ExampleUI.php
index e5d11ffddd..46449d51b2 100644
--- a/plugins/ExampleUI/ExampleUI.php
+++ b/plugins/ExampleUI/ExampleUI.php
@@ -11,6 +11,7 @@
namespace Piwik\Plugins\ExampleUI;
use Piwik\Menu\MenuMain;
+use Piwik\Menu\MenuTop;
/**
* @package ExampleUI
@@ -23,11 +24,12 @@ class ExampleUI extends \Piwik\Plugin
public function getListHooksRegistered()
{
return array(
- 'Menu.Reporting.addItems' => 'addMenus',
+ 'Menu.Reporting.addItems' => 'addReportingMenuItems',
+ 'Menu.Top.addItems' => 'addTopMenuItems',
);
}
- function addMenus()
+ function addReportingMenuItems()
{
MenuMain::getInstance()->add('UI Framework', '', array('module' => 'ExampleUI', 'action' => 'dataTables'), true, 30);
@@ -39,6 +41,12 @@ class ExampleUI extends \Piwik\Plugin
$this->addSubMenu('Evolution Graph', 'evolutionGraph', 6);
}
+ function addTopMenuItems()
+ {
+ $urlParams = array('module' => 'ExampleUI', 'action' => 'notifications');
+ MenuTop::getInstance()->addEntry('Example UI Notifications', $urlParams, $displayedForCurrentUser = true, $order = 3);
+ }
+
private function addSubMenu($subMenu, $action, $order)
{
MenuMain::getInstance()->add('UI Framework', $subMenu, array('module' => 'ExampleUI', 'action' => $action), true, $order);