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
path: root/core/Menu
diff options
context:
space:
mode:
authorThomas Steur <thomas.steur@googlemail.com>2014-07-18 14:44:06 +0400
committerThomas Steur <thomas.steur@googlemail.com>2014-07-18 14:44:06 +0400
commitc43989c7c1242b08348a922702ff163b9fa09ea7 (patch)
treedacfc1d1c630f605371b585dbfd4eb426a6e0baf /core/Menu
parent9df00a69dc93f29bd9a8efbe8bb239a3b9e07886 (diff)
refs #5820 better naming
Diffstat (limited to 'core/Menu')
-rw-r--r--core/Menu/MenuAbstract.php4
-rw-r--r--core/Menu/MenuAdmin.php2
-rw-r--r--core/Menu/MenuReporting.php2
-rw-r--r--core/Menu/MenuTop.php2
-rwxr-xr-xcore/Menu/MenuUser.php2
5 files changed, 7 insertions, 5 deletions
diff --git a/core/Menu/MenuAbstract.php b/core/Menu/MenuAbstract.php
index 69b48f76b1..3c3fd4e013 100644
--- a/core/Menu/MenuAbstract.php
+++ b/core/Menu/MenuAbstract.php
@@ -55,7 +55,7 @@ abstract class MenuAbstract extends Singleton
*
* @return \Piwik\Plugin\Menu[]
*/
- protected function getAvailableMenus()
+ protected function getAllMenus()
{
if (!empty(self::$menus)) {
return self::$menus;
@@ -82,6 +82,8 @@ abstract class MenuAbstract extends Singleton
public function add($menuName, $subMenuName, $url, $displayedForCurrentUser = true, $order = 50, $tooltip = false)
{
if (!$displayedForCurrentUser) {
+ // TODO this parameter should be removed and instead menu items should be only added if it is supposed to be
+ // displayed. Won't do it now to stay backward compatible. For Piwik 3.0 we should do it.
return;
}
diff --git a/core/Menu/MenuAdmin.php b/core/Menu/MenuAdmin.php
index 8b11500c12..106420b712 100644
--- a/core/Menu/MenuAdmin.php
+++ b/core/Menu/MenuAdmin.php
@@ -63,7 +63,7 @@ class MenuAdmin extends MenuAbstract
*/
Piwik::postEvent('Menu.Admin.addItems', array());
- foreach ($this->getAvailableMenus() as $menu) {
+ foreach ($this->getAllMenus() as $menu) {
$menu->configureAdminMenu($this);
}
}
diff --git a/core/Menu/MenuReporting.php b/core/Menu/MenuReporting.php
index c085e7b41d..c5a3c1da1e 100644
--- a/core/Menu/MenuReporting.php
+++ b/core/Menu/MenuReporting.php
@@ -74,7 +74,7 @@ class MenuReporting extends MenuAbstract
}
}
- foreach ($this->getAvailableMenus() as $menu) {
+ foreach ($this->getAllMenus() as $menu) {
$menu->configureReportingMenu($this);
}
diff --git a/core/Menu/MenuTop.php b/core/Menu/MenuTop.php
index 1b3b543179..e69272ce7c 100644
--- a/core/Menu/MenuTop.php
+++ b/core/Menu/MenuTop.php
@@ -100,7 +100,7 @@ class MenuTop extends MenuAbstract
*/
Piwik::postEvent('Menu.Top.addItems', array());
- foreach ($this->getAvailableMenus() as $menu) {
+ foreach ($this->getAllMenus() as $menu) {
$menu->configureTopMenu($this);
}
}
diff --git a/core/Menu/MenuUser.php b/core/Menu/MenuUser.php
index 25048a8682..318e8b3f0f 100755
--- a/core/Menu/MenuUser.php
+++ b/core/Menu/MenuUser.php
@@ -39,7 +39,7 @@ class MenuUser extends MenuAbstract
public function getMenu()
{
if (!$this->menu) {
- foreach ($this->getAvailableMenus() as $menu) {
+ foreach ($this->getAllMenus() as $menu) {
$menu->configureUserMenu($this);
}
}