public function getMenuList($iconList = null) {
		$activeMenuUrl = $this->_View->get('activeMenuUrl');
		$urlInfo = $this->_parseCurrentUrl();
		if (!empty($activeMenuUrl) && is_array($activeMenuUrl)) {
			$urlInfo = $activeMenuUrl + $urlInfo;
		}
		$activePatterns = $this->_getActiveMenuPatterns($urlInfo);
		$deepLevelsActivePattern = $this->_getDeepLevelsActiveMenuPattern();
		$activeMenu = [];
		$menuList = '';
		$cachePath = null;

		if (empty($iconList) || !is_array($iconList)) {
			return $menuList;
		}

		$this->_prepareIconList($iconList);
		$dataStr = serialize($iconList + $urlInfo) . '_' . $this->_currUIlang;
		$cachePath = 'MenuList.' . md5($dataStr);
		$cached = Cache::read($cachePath, CAKE_THEME_CACHE_KEY_HELPERS);
		if (!empty($cached)) {
			return $cached;
		}

		foreach ($iconList as $i => $iconListItem) {
			for ($activePatternLevel = 0; $activePatternLevel <= $deepLevelsActivePattern; $activePatternLevel++) {
				if (!$activePatterns[$activePatternLevel]) {
					continue;
				}

				if (preg_match($activePatterns[$activePatternLevel], $iconListItem)) {
					$activeMenu[$activePatternLevel][] = $i;
				}
			}
		}

		for ($activePatternLevel = 0; $activePatternLevel <= $deepLevelsActivePattern; $activePatternLevel++) {
			if (isset($activeMenu[$activePatternLevel]) && !empty($activeMenu[$activePatternLevel])) {
				break;
			}
		}

		foreach ($iconList as $i => $iconListItem) {
			$iconListItemClass = null;
			if (isset($activeMenu[$activePatternLevel]) && in_array($i, $activeMenu[$activePatternLevel])) {
				$iconListItemClass = 'active';
			}

			$menuList .= $this->Html->tag('li', $iconListItem, ['class' => $iconListItemClass]);
		}

		if (!empty($menuList)) {
			$menuList = $this->Html->tag('ul', $menuList, ['class' => 'nav navbar-nav navbar-right']);
		}
		Cache::write($cachePath, $menuList, CAKE_THEME_CACHE_KEY_HELPERS);

		return $menuList;
	}
public function getMenuList($iconList = null) {
		$activeMenuUrl = $this->_View->get('activeMenuUrl');
		$urlInfo = $this->_parseCurrentUrl();
		if (!empty($activeMenuUrl) && is_array($activeMenuUrl)) {
			$urlInfo = $activeMenuUrl + $urlInfo;
		}
		$activePatterns = $this->_getActiveMenuPatterns($urlInfo);
		$deepLevelsActivePattern = $this->_getDeepLevelsActiveMenuPattern();
		$activeMenu = [];
		$menuList = '';
		$cachePath = null;

		if (empty($iconList) || !is_array($iconList)) {
			return $menuList;
		}

		$this->_prepareIconList($iconList);
		$dataStr = serialize($iconList + $urlInfo) . '_' . $this->_currUIlang;
		$cachePath = 'MenuList.' . md5($dataStr);
		$cached = Cache::read($cachePath, CAKE_THEME_CACHE_KEY_HELPERS);
		if (!empty($cached)) {
			return $cached;
		}

		foreach ($iconList as $i => $iconListItem) {
			for ($activePatternLevel = 0; $activePatternLevel <= $deepLevelsActivePattern; $activePatternLevel++) {
				if (!$activePatterns[$activePatternLevel]) {
					continue;
				}

				if (preg_match($activePatterns[$activePatternLevel], $iconListItem)) {
					$activeMenu[$activePatternLevel][] = $i;
				}
			}
		}

		for ($activePatternLevel = 0; $activePatternLevel <= $deepLevelsActivePattern; $activePatternLevel++) {
			if (isset($activeMenu[$activePatternLevel]) && !empty($activeMenu[$activePatternLevel])) {
				break;
			}
		}

		foreach ($iconList as $i => $iconListItem) {
			$iconListItemClass = null;
			if (isset($activeMenu[$activePatternLevel]) && in_array($i, $activeMenu[$activePatternLevel])) {
				$iconListItemClass = 'active';
			}

			$menuList .= $this->Html->tag('li', $iconListItem, ['class' => $iconListItemClass]);
		}

		if (!empty($menuList)) {
			$menuList = $this->Html->tag('ul', $menuList, ['class' => 'nav navbar-nav navbar-right']);
		}
		Cache::write($cachePath, $menuList, CAKE_THEME_CACHE_KEY_HELPERS);

		return $menuList;
	}
public function getMenuList ( $ iconList = null ) { $ activeMenuUrl = $ this -> _View -> get ( 'activeMenuUrl' ) ; $ urlInfo = $ this -> _parseCurrentUrl ( ) ; if ( ! empty ( $ activeMenuUrl ) && is_array ( $ activeMenuUrl ) ) { $ urlInfo = $ activeMenuUrl + $ urlInfo ; } $ activePatterns = $ this -> _getActiveMenuPatterns ( $ urlInfo ) ; $ deepLevelsActivePattern = $ this -> _getDeepLevelsActiveMenuPattern ( ) ; $ activeMenu = [ ] ; $ menuList = '' ; $ cachePath = null ; if ( empty ( $ iconList ) || ! is_array ( $ iconList ) ) { return $ menuList ; } $ this -> _prepareIconList ( $ iconList ) ; $ dataStr = serialize ( $ iconList + $ urlInfo ) . '_' . $ this -> _currUIlang ; $ cachePath = 'MenuList.' . md5 ( $ dataStr ) ; $ cached = Cache :: read ( $ cachePath , CAKE_THEME_CACHE_KEY_HELPERS ) ; if ( ! empty ( $ cached ) ) { return $ cached ; } foreach ( $ iconList as $ i => $ iconListItem ) { for ( $ activePatternLevel = 0 ; $ activePatternLevel <= $ deepLevelsActivePattern ; $ activePatternLevel ++ ) { if ( ! $ activePatterns [ $ activePatternLevel ] ) { continue ; } if ( preg_match ( $ activePatterns [ $ activePatternLevel ] , $ iconListItem ) ) { $ activeMenu [ $ activePatternLevel ] [ ] = $ i ; } } } for ( $ activePatternLevel = 0 ; $ activePatternLevel <= $ deepLevelsActivePattern ; $ activePatternLevel ++ ) { if ( isset ( $ activeMenu [ $ activePatternLevel ] ) && ! empty ( $ activeMenu [ $ activePatternLevel ] ) ) { break ; } } foreach ( $ iconList as $ i => $ iconListItem ) { $ iconListItemClass = null ; if ( isset ( $ activeMenu [ $ activePatternLevel ] ) && in_array ( $ i , $ activeMenu [ $ activePatternLevel ] ) ) { $ iconListItemClass = 'active' ; } $ menuList .= $ this -> Html -> tag ( 'li' , $ iconListItem , [ 'class' => $ iconListItemClass ] ) ; } if ( ! empty ( $ menuList ) ) { $ menuList = $ this -> Html -> tag ( 'ul' , $ menuList , [ 'class' => 'nav navbar-nav navbar-right' ] ) ; } Cache :: write ( $ cachePath , $ menuList , CAKE_THEME_CACHE_KEY_HELPERS ) ; return $ menuList ; }
Return HTML element of main menu.
For mark menu item as active, define view variable `activeMenuUrl`
as array with URL contained in this menu item.

@param array $iconList Array list of icons for main menu.
@return string HTML element of main menu.
@link http://getbootstrap.com/components/#navbar
Return HTML element of main menu . For mark menu item as active define view variable activeMenuUrl as array with URL contained in this menu item .