Skip to content
Extraits de code Groupes Projets
Valider c43989c7 rédigé par Thomas Steur's avatar Thomas Steur
Parcourir les fichiers

refs #5820 better naming

parent 9df00a69
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -55,7 +55,7 @@ abstract class MenuAbstract extends Singleton ...@@ -55,7 +55,7 @@ abstract class MenuAbstract extends Singleton
* *
* @return \Piwik\Plugin\Menu[] * @return \Piwik\Plugin\Menu[]
*/ */
protected function getAvailableMenus() protected function getAllMenus()
{ {
if (!empty(self::$menus)) { if (!empty(self::$menus)) {
return self::$menus; return self::$menus;
...@@ -82,6 +82,8 @@ abstract class MenuAbstract extends Singleton ...@@ -82,6 +82,8 @@ abstract class MenuAbstract extends Singleton
public function add($menuName, $subMenuName, $url, $displayedForCurrentUser = true, $order = 50, $tooltip = false) public function add($menuName, $subMenuName, $url, $displayedForCurrentUser = true, $order = 50, $tooltip = false)
{ {
if (!$displayedForCurrentUser) { 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; return;
} }
......
...@@ -63,7 +63,7 @@ class MenuAdmin extends MenuAbstract ...@@ -63,7 +63,7 @@ class MenuAdmin extends MenuAbstract
*/ */
Piwik::postEvent('Menu.Admin.addItems', array()); Piwik::postEvent('Menu.Admin.addItems', array());
foreach ($this->getAvailableMenus() as $menu) { foreach ($this->getAllMenus() as $menu) {
$menu->configureAdminMenu($this); $menu->configureAdminMenu($this);
} }
} }
......
...@@ -74,7 +74,7 @@ class MenuReporting extends MenuAbstract ...@@ -74,7 +74,7 @@ class MenuReporting extends MenuAbstract
} }
} }
foreach ($this->getAvailableMenus() as $menu) { foreach ($this->getAllMenus() as $menu) {
$menu->configureReportingMenu($this); $menu->configureReportingMenu($this);
} }
......
...@@ -100,7 +100,7 @@ class MenuTop extends MenuAbstract ...@@ -100,7 +100,7 @@ class MenuTop extends MenuAbstract
*/ */
Piwik::postEvent('Menu.Top.addItems', array()); Piwik::postEvent('Menu.Top.addItems', array());
foreach ($this->getAvailableMenus() as $menu) { foreach ($this->getAllMenus() as $menu) {
$menu->configureTopMenu($this); $menu->configureTopMenu($this);
} }
} }
......
...@@ -39,7 +39,7 @@ class MenuUser extends MenuAbstract ...@@ -39,7 +39,7 @@ class MenuUser extends MenuAbstract
public function getMenu() public function getMenu()
{ {
if (!$this->menu) { if (!$this->menu) {
foreach ($this->getAvailableMenus() as $menu) { foreach ($this->getAllMenus() as $menu) {
$menu->configureUserMenu($this); $menu->configureUserMenu($this);
} }
} }
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter