protected function clearSelectedMenuEntries(Menu $menu) {

		while(($e = $menu->getSelectedEntry())) {

			// dynamic menus come either with unselected entry or have a selected entry explicitly set

			if($menu->getType() == 'static') {
				$menu->clearSelectedEntry();
			}
			if(!($menu = $e->getSubMenu())) {
				break;
			}
		}
	}
protected function clearSelectedMenuEntries(Menu $menu) {

		while(($e = $menu->getSelectedEntry())) {

			// dynamic menus come either with unselected entry or have a selected entry explicitly set

			if($menu->getType() == 'static') {
				$menu->clearSelectedEntry();
			}
			if(!($menu = $e->getSubMenu())) {
				break;
			}
		}
	}
protected function clearSelectedMenuEntries ( Menu $ menu ) { while ( ( $ e = $ menu -> getSelectedEntry ( ) ) ) { // dynamic menus come either with unselected entry or have a selected entry explicitly set if ( $ menu -> getType ( ) == 'static' ) { $ menu -> clearSelectedEntry ( ) ; } if ( ! ( $ menu = $ e -> getSubMenu ( ) ) ) { break ; } } }
walks menu tree and clears all previously selected entries

@param Menu $menu
walks menu tree and clears all previously selected entries