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-09-06 14:16:37 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-09-06 14:16:37 +0400
commiteee6ed99cf522e4e65df6618f5cd919a18da481b (patch)
tree5e7b017e408a9f9597868227919182db1f8c66f5 /plugins/ExampleUI
parent099c969cb987607437c6b7beabcd4e6883e5998d (diff)
refs #6140 easier way to define URLs for menu items and introducing a method to addItem without boolean parameter
Diffstat (limited to 'plugins/ExampleUI')
-rw-r--r--plugins/ExampleUI/Menu.php7
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);
}
}