public function getSubMenu($menuName, $level = 1)
{
$currentParent = false;
$mainMenuIterator = $this->getFullMenu($menuName);
if (!$mainMenuIterator) {
return false;
}
foreach ($mainMenuIterator as $menuItem) {
if ($this->currentPath === $menuItem->getPath() || $this->currentPath === $menuItem->getInternalUrl()) {
$currentParent = $menuItem->getParentByLevel($level);
}
}
if (!$currentParent) {
return false;
}
$menuIterator = $this->menuManager->getChildrenByStatus($currentParent, false, null, 'ASC', false, $this->viewStatus);
return $menuIterator;
}