public function menuActionLink($icon = null, $titleText = null, $url = null, $options = []) {
		$result = '';
		if (empty($icon)) {
			return $result;
		}

		if ($this->_getClassForElement($icon)) {
			$icon .= ' fa-fw';
		}
		$iconClass = $this->_getClassForElement($icon);
		if (empty($iconClass)) {
			return $result;
		}

		$title = $this->Html->tag('span', '', ['class' => $iconClass]);
		if (!empty($titleText)) {
			$title .= $this->Html->tag('span', $titleText, ['class' => 'menu-item-label']);
		}

		if (empty($options)) {
			$options = [];
		} elseif (!is_array($options)) {
			$options = [$options];
		}

		$optionsDefault = [
			'escape' => false,
		];
		if (isset($options['title'])) {
			$optionsDefault['data-toggle'] = 'title';
		}

		$url = $this->addUserPrefixUrl($url);
		$postLink = $this->_processActionTypeOpt($options);
		if ($postLink) {
			$result = $this->ExtBs3Form->postLink($title, $url, $options + $optionsDefault);
		} else {
			$result = $this->Html->link($title, $url, $options + $optionsDefault);
		}

		return $result;
	}
public function menuActionLink($icon = null, $titleText = null, $url = null, $options = []) {
		$result = '';
		if (empty($icon)) {
			return $result;
		}

		if ($this->_getClassForElement($icon)) {
			$icon .= ' fa-fw';
		}
		$iconClass = $this->_getClassForElement($icon);
		if (empty($iconClass)) {
			return $result;
		}

		$title = $this->Html->tag('span', '', ['class' => $iconClass]);
		if (!empty($titleText)) {
			$title .= $this->Html->tag('span', $titleText, ['class' => 'menu-item-label']);
		}

		if (empty($options)) {
			$options = [];
		} elseif (!is_array($options)) {
			$options = [$options];
		}

		$optionsDefault = [
			'escape' => false,
		];
		if (isset($options['title'])) {
			$optionsDefault['data-toggle'] = 'title';
		}

		$url = $this->addUserPrefixUrl($url);
		$postLink = $this->_processActionTypeOpt($options);
		if ($postLink) {
			$result = $this->ExtBs3Form->postLink($title, $url, $options + $optionsDefault);
		} else {
			$result = $this->Html->link($title, $url, $options + $optionsDefault);
		}

		return $result;
	}
public function menuActionLink ( $ icon = null , $ titleText = null , $ url = null , $ options = [ ] ) { $ result = '' ; if ( empty ( $ icon ) ) { return $ result ; } if ( $ this -> _getClassForElement ( $ icon ) ) { $ icon .= ' fa-fw' ; } $ iconClass = $ this -> _getClassForElement ( $ icon ) ; if ( empty ( $ iconClass ) ) { return $ result ; } $ title = $ this -> Html -> tag ( 'span' , '' , [ 'class' => $ iconClass ] ) ; if ( ! empty ( $ titleText ) ) { $ title .= $ this -> Html -> tag ( 'span' , $ titleText , [ 'class' => 'menu-item-label' ] ) ; } if ( empty ( $ options ) ) { $ options = [ ] ; } elseif ( ! is_array ( $ options ) ) { $ options = [ $ options ] ; } $ optionsDefault = [ 'escape' => false , ] ; if ( isset ( $ options [ 'title' ] ) ) { $ optionsDefault [ 'data-toggle' ] = 'title' ; } $ url = $ this -> addUserPrefixUrl ( $ url ) ; $ postLink = $ this -> _processActionTypeOpt ( $ options ) ; if ( $ postLink ) { $ result = $ this -> ExtBs3Form -> postLink ( $ title , $ url , $ options + $ optionsDefault ) ; } else { $ result = $ this -> Html -> link ( $ title , $ url , $ options + $ optionsDefault ) ; } return $ result ; }
Return HTML element of item for page header menu

@param string $icon class of icon
@param string $titleText Title of menu label
@param string|array $url Cake-relative URL or array of URL parameters, or external URL (starts with http://)
@param array|string $options HTML options for button element
List of values option `action-type`:
- `confirm`: create link with confirmation action;
- `confirm-post`: create link with confirmation action
and POST request;
- `post`: create link with POST request;
- `modal`: create link with opening result in modal window.
@return string HTML element of item for page header menu
@link http://fontawesome.io
Return HTML element of item for page header menu