diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-20 03:05:41 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-05-20 03:05:41 +0400 |
commit | b2cb622bf1ea754a73ce06e165a083e3305aa807 (patch) | |
tree | 43bf1134201759cf73b88d53274fa87fdffebd0d /plugins/DBStats | |
parent | 009a6f21177e8cb6366577d8f54024e896bb0d8e (diff) |
refs #5192 continued menu refactoring. not sure yet how good this idea is but seems to be already better than before
Diffstat (limited to 'plugins/DBStats')
-rw-r--r-- | plugins/DBStats/DBStats.php | 9 | ||||
-rw-r--r-- | plugins/DBStats/Menu.php | 32 |
2 files changed, 32 insertions, 9 deletions
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 4b95c95f1c..e1b02aa5bd 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -34,7 +34,6 @@ class DBStats extends \Piwik\Plugin { return array( 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', - 'Menu.Admin.addItems' => 'addMenu', 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks', 'ViewDataTable.configure' => 'configureViewDataTable', 'ViewDataTable.getDefaultType' => 'getDefaultTypeViewDataTable', @@ -42,14 +41,6 @@ class DBStats extends \Piwik\Plugin ); } - function addMenu(MenuAbstract $menu) - { - $menu->add('CoreAdminHome_MenuDiagnostic', 'DBStats_DatabaseUsage', - array('module' => 'DBStats', 'action' => 'index'), - Piwik::hasUserSuperUserAccess(), - $order = 6); - } - /** * Gets all scheduled tasks executed by this plugin. */ diff --git a/plugins/DBStats/Menu.php b/plugins/DBStats/Menu.php new file mode 100644 index 0000000000..aa1c1693a4 --- /dev/null +++ b/plugins/DBStats/Menu.php @@ -0,0 +1,32 @@ +<?php +/** + * Piwik - Open source web analytics + * + * @link http://piwik.org + * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later + * + */ +namespace Piwik\Plugins\DBStats; + +use Exception; +use Piwik\Common; +use Piwik\Db; +use Piwik\Menu\MenuAbstract; +use Piwik\Menu\MenuAdmin; +use Piwik\Menu\MenuReporting; +use Piwik\Menu\MenuTop; +use Piwik\Piwik; +use Piwik\Site; + +/** + */ +class Menu extends \Piwik\Plugin\Menu +{ + public function configureAdminMenu(MenuAdmin $menu) + { + $menu->add('CoreAdminHome_MenuDiagnostic', 'DBStats_DatabaseUsage', + array('module' => 'DBStats', 'action' => 'index'), + Piwik::hasUserSuperUserAccess(), + $order = 6); + } +} |