src/View/Helper/FormatHelper.php
protected function _fontIcon($type, $options, $attributes) {
		$iconClass = $type;

		$options += $this->_config;
		if ($options['autoPrefix'] && $options['iconNamespace']) {
			$iconClass = $options['iconNamespace'] . '-' . $iconClass;
		}
		if ($options['iconNamespace']) {
			$iconClass = $options['iconNamespace'] . ' ' . $iconClass;
		}

		if (isset($this->_config['fontIcons'][$type])) {
			$iconClass = $this->_config['fontIcons'][$type];
		}

		$defaults = [
			'class' => 'icon icon-' . $type . ' ' . $iconClass,
			'escape' => true,
		];
		$options += $defaults;

		if (!isset($attributes['title'])) {
			$attributes['title'] = ucfirst($type);
			if (!isset($options['translate']) || $options['translate'] !== false) {
				$attributes['title'] = __($attributes['title']);
			}
		}

		$attributes += [
			'data-placement' => 'bottom',
			'data-toggle' => 'tooltip'
		];
		$formatOptions = $attributes + [
			'escape' => $options['escape'],
		];

		$options['attributes'] = $this->template->formatAttributes($formatOptions);
		return $this->template->format('icon', $options);
	}
protected function _fontIcon($type, $options, $attributes) {
		$iconClass = $type;

		$options += $this->_config;
		if ($options['autoPrefix'] && $options['iconNamespace']) {
			$iconClass = $options['iconNamespace'] . '-' . $iconClass;
		}
		if ($options['iconNamespace']) {
			$iconClass = $options['iconNamespace'] . ' ' . $iconClass;
		}

		if (isset($this->_config['fontIcons'][$type])) {
			$iconClass = $this->_config['fontIcons'][$type];
		}

		$defaults = [
			'class' => 'icon icon-' . $type . ' ' . $iconClass,
			'escape' => true,
		];
		$options += $defaults;

		if (!isset($attributes['title'])) {
			$attributes['title'] = ucfirst($type);
			if (!isset($options['translate']) || $options['translate'] !== false) {
				$attributes['title'] = __($attributes['title']);
			}
		}

		$attributes += [
			'data-placement' => 'bottom',
			'data-toggle' => 'tooltip'
		];
		$formatOptions = $attributes + [
			'escape' => $options['escape'],
		];

		$options['attributes'] = $this->template->formatAttributes($formatOptions);
		return $this->template->format('icon', $options);
	}
protected function _fontIcon ( $ type , $ options , $ attributes ) { $ iconClass = $ type ; $ options += $ this -> _config ; if ( $ options [ 'autoPrefix' ] && $ options [ 'iconNamespace' ] ) { $ iconClass = $ options [ 'iconNamespace' ] . '-' . $ iconClass ; } if ( $ options [ 'iconNamespace' ] ) { $ iconClass = $ options [ 'iconNamespace' ] . ' ' . $ iconClass ; } if ( isset ( $ this -> _config [ 'fontIcons' ] [ $ type ] ) ) { $ iconClass = $ this -> _config [ 'fontIcons' ] [ $ type ] ; } $ defaults = [ 'class' => 'icon icon-' . $ type . ' ' . $ iconClass , 'escape' => true , ] ; $ options += $ defaults ; if ( ! isset ( $ attributes [ 'title' ] ) ) { $ attributes [ 'title' ] = ucfirst ( $ type ) ; if ( ! isset ( $ options [ 'translate' ] ) || $ options [ 'translate' ] !== false ) { $ attributes [ 'title' ] = __ ( $ attributes [ 'title' ] ) ; } } $ attributes += [ 'data-placement' => 'bottom' , 'data-toggle' => 'tooltip' ] ; $ formatOptions = $ attributes + [ 'escape' => $ options [ 'escape' ] , ] ; $ options [ 'attributes' ] = $ this -> template -> formatAttributes ( $ formatOptions ) ; return $ this -> template -> format ( 'icon' , $ options ) ; }
Renders a font icon.

@param string $type
@param array $options
@param array $attributes
@return string
Renders a font icon .