public function menuHeaderPage($headerMenuActions = null) {
		$result = '';
		if (empty($headerMenuActions)) {
			return $result;
		}

		if (!is_array($headerMenuActions)) {
			$headerMenuActions = [$headerMenuActions];
		}

		$headerMenuActionsPrep = '';
		foreach ($headerMenuActions as $action) {
			$actionOptions = [];
			if (!is_array($action)) {
				if ($action === 'divider') {
					$action = '';
					$actionOptions = ['class' => 'divider'];
				}
				$headerMenuActionsPrep .= $this->Html->tag('li', $action, $actionOptions);
			} elseif (is_array($action)) {
				$actionSize = count($action);
				if ($actionSize == 1) {
					$actionLabal = array_shift($action);
					if (empty($actionLabal)) {
						continue;
					}
					$headerMenuActionsPrep .= $this->Html->tag('li', $actionLabal);
				} elseif ($actionSize == 2) {
					$actionLabal = array_shift($action);
					if (empty($actionLabal)) {
						continue;
					}
					$actionOptions = array_shift($action);
					if (!is_array($actionOptions)) {
						$actionOptions = [];
					}
					$headerMenuActionsPrep .= $this->Html->tag('li', $actionLabal, $actionOptions);
				} elseif (($actionSize >= 3) && ($actionSize <= 4)) {
					$action = call_user_func_array([$this, 'menuActionLink'], $action);
					$headerMenuActionsPrep .= $this->Html->tag('li', $action, $actionOptions);
				}
			}
		}

		if (empty($headerMenuActionsPrep)) {
			return $result;
		}
		$result = $this->Html->div(
			'btn-group page-header-menu hidden-print',
			$this->_getOptionsForElem('btnHeaderMenu') .
				$this->Html->tag('ul', $headerMenuActionsPrep, ['class' => 'dropdown-menu', 'aria-labelledby' => 'pageHeaderMenu'])
		);

		return $result;
	}
public function menuHeaderPage($headerMenuActions = null) {
		$result = '';
		if (empty($headerMenuActions)) {
			return $result;
		}

		if (!is_array($headerMenuActions)) {
			$headerMenuActions = [$headerMenuActions];
		}

		$headerMenuActionsPrep = '';
		foreach ($headerMenuActions as $action) {
			$actionOptions = [];
			if (!is_array($action)) {
				if ($action === 'divider') {
					$action = '';
					$actionOptions = ['class' => 'divider'];
				}
				$headerMenuActionsPrep .= $this->Html->tag('li', $action, $actionOptions);
			} elseif (is_array($action)) {
				$actionSize = count($action);
				if ($actionSize == 1) {
					$actionLabal = array_shift($action);
					if (empty($actionLabal)) {
						continue;
					}
					$headerMenuActionsPrep .= $this->Html->tag('li', $actionLabal);
				} elseif ($actionSize == 2) {
					$actionLabal = array_shift($action);
					if (empty($actionLabal)) {
						continue;
					}
					$actionOptions = array_shift($action);
					if (!is_array($actionOptions)) {
						$actionOptions = [];
					}
					$headerMenuActionsPrep .= $this->Html->tag('li', $actionLabal, $actionOptions);
				} elseif (($actionSize >= 3) && ($actionSize <= 4)) {
					$action = call_user_func_array([$this, 'menuActionLink'], $action);
					$headerMenuActionsPrep .= $this->Html->tag('li', $action, $actionOptions);
				}
			}
		}

		if (empty($headerMenuActionsPrep)) {
			return $result;
		}
		$result = $this->Html->div(
			'btn-group page-header-menu hidden-print',
			$this->_getOptionsForElem('btnHeaderMenu') .
				$this->Html->tag('ul', $headerMenuActionsPrep, ['class' => 'dropdown-menu', 'aria-labelledby' => 'pageHeaderMenu'])
		);

		return $result;
	}
public function menuHeaderPage ( $ headerMenuActions = null ) { $ result = '' ; if ( empty ( $ headerMenuActions ) ) { return $ result ; } if ( ! is_array ( $ headerMenuActions ) ) { $ headerMenuActions = [ $ headerMenuActions ] ; } $ headerMenuActionsPrep = '' ; foreach ( $ headerMenuActions as $ action ) { $ actionOptions = [ ] ; if ( ! is_array ( $ action ) ) { if ( $ action === 'divider' ) { $ action = '' ; $ actionOptions = [ 'class' => 'divider' ] ; } $ headerMenuActionsPrep .= $ this -> Html -> tag ( 'li' , $ action , $ actionOptions ) ; } elseif ( is_array ( $ action ) ) { $ actionSize = count ( $ action ) ; if ( $ actionSize == 1 ) { $ actionLabal = array_shift ( $ action ) ; if ( empty ( $ actionLabal ) ) { continue ; } $ headerMenuActionsPrep .= $ this -> Html -> tag ( 'li' , $ actionLabal ) ; } elseif ( $ actionSize == 2 ) { $ actionLabal = array_shift ( $ action ) ; if ( empty ( $ actionLabal ) ) { continue ; } $ actionOptions = array_shift ( $ action ) ; if ( ! is_array ( $ actionOptions ) ) { $ actionOptions = [ ] ; } $ headerMenuActionsPrep .= $ this -> Html -> tag ( 'li' , $ actionLabal , $ actionOptions ) ; } elseif ( ( $ actionSize >= 3 ) && ( $ actionSize <= 4 ) ) { $ action = call_user_func_array ( [ $ this , 'menuActionLink' ] , $ action ) ; $ headerMenuActionsPrep .= $ this -> Html -> tag ( 'li' , $ action , $ actionOptions ) ; } } } if ( empty ( $ headerMenuActionsPrep ) ) { return $ result ; } $ result = $ this -> Html -> div ( 'btn-group page-header-menu hidden-print' , $ this -> _getOptionsForElem ( 'btnHeaderMenu' ) . $ this -> Html -> tag ( 'ul' , $ headerMenuActionsPrep , [ 'class' => 'dropdown-menu' , 'aria-labelledby' => 'pageHeaderMenu' ] ) ) ; return $ result ; }
Return menu for header of page.

@param array|string $headerMenuActions List of menu actions.
If is array with number of elements:
- 1: use as menu item label;
- 2: first item use as menu item label, second item use as menu item options;
- 3 or 4: use parameters for ViewExtensionHelper::menuActionLink().
@return string Return menu for header of page.
@see ViewExtensionHelper::menuActionLink()
Return menu for header of page .