Added comment to newly added function

This commit is contained in:
Jocy 2017-05-17 16:11:41 +02:00
parent b5494576d2
commit 46ff13898f

View File

@ -68,7 +68,13 @@ class SidebarMenuManager implements UsageInformationAble, CallbackListener {
return $pos; 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; $count = 0;
foreach($this->menuEntries as $k => $entry){ foreach($this->menuEntries as $k => $entry){
if($k < SidebarMenuManager::ORDER_ADMIN_MENU){ if($k < SidebarMenuManager::ORDER_ADMIN_MENU){
@ -90,7 +96,7 @@ class SidebarMenuManager implements UsageInformationAble, CallbackListener {
$itemMarginFactor = 1.2; $itemMarginFactor = 1.2;
$pos = $this->getSidebarPosition(); $pos = $this->getSidebarPosition();
$count = $this->getElementCountbeforeAdminMenu(); $count = $this->getElementCountBeforeAdminMenu();
$pos->setY($pos->getY() + $itemSize * $itemMarginFactor * $count); $pos->setY($pos->getY() + $itemSize * $itemMarginFactor * $count);