diff options
Diffstat (limited to 'plugins/ExampleUI')
-rw-r--r-- | plugins/ExampleUI/Menu.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/ExampleUI/Menu.php b/plugins/ExampleUI/Menu.php index 8b5f1bcfea..d608968edf 100644 --- a/plugins/ExampleUI/Menu.php +++ b/plugins/ExampleUI/Menu.php @@ -18,7 +18,7 @@ class Menu extends \Piwik\Plugin\Menu { public function configureReportingMenu(MenuReporting $menu) { - $menu->add('UI Framework', '', array('module' => 'ExampleUI', 'action' => 'dataTables'), true, 30); + $menu->addItem('UI Framework', '', array('module' => 'ExampleUI', 'action' => 'dataTables'), 30); $this->addSubMenu($menu, 'Data tables', 'dataTables', 1); $this->addSubMenu($menu, 'Bar graph', 'barGraph', 2); @@ -34,12 +34,11 @@ class Menu extends \Piwik\Plugin\Menu public function configureUserMenu(MenuUser $menu) { - $urlParams = array('module' => 'ExampleUI', 'action' => 'notifications'); - $menu->addPlatformItem('UI Notifications', $urlParams, $order = 3); + $menu->addPlatformItem('UI Notifications', $this->urlForAction('notifications'), $order = 3); } private function addSubMenu(MenuReporting $menu, $subMenu, $action, $order) { - $menu->add('UI Framework', $subMenu, array('module' => 'ExampleUI', 'action' => $action), true, $order); + $menu->addItem('UI Framework', $subMenu, $this->urlForAction($action), $order); } } |