From 46ff13898f270dacb09da8430e158e0654927907 Mon Sep 17 00:00:00 2001 From: Jocy Date: Wed, 17 May 2017 16:11:41 +0200 Subject: [PATCH] Added comment to newly added function --- core/Manialinks/SidebarMenuManager.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/Manialinks/SidebarMenuManager.php b/core/Manialinks/SidebarMenuManager.php index 80d7d971..3b5c4207 100644 --- a/core/Manialinks/SidebarMenuManager.php +++ b/core/Manialinks/SidebarMenuManager.php @@ -68,7 +68,13 @@ class SidebarMenuManager implements UsageInformationAble, CallbackListener { return $pos; } - private function getElementCountbeforeAdminMenu(){ + /** + * Returns the number of elements above the admin menu + * Used to make the y-value setting of the sidebar relative to the admin menu + * + * @return int + */ + private function getElementCountBeforeAdminMenu(){ $count = 0; foreach($this->menuEntries as $k => $entry){ if($k < SidebarMenuManager::ORDER_ADMIN_MENU){ @@ -90,7 +96,7 @@ class SidebarMenuManager implements UsageInformationAble, CallbackListener { $itemMarginFactor = 1.2; $pos = $this->getSidebarPosition(); - $count = $this->getElementCountbeforeAdminMenu(); + $count = $this->getElementCountBeforeAdminMenu(); $pos->setY($pos->getY() + $itemSize * $itemMarginFactor * $count);