src/View/Helper/FormatHelper.php
public function icon($icon, array $options = [], array $attributes = []) {
		if (!$icon) {
			return '';
		}

		$defaults = [
			'translate' => true,
		];
		$options += $defaults;

		$type = $icon;
		if ($this->getConfig('autoPrefix') && empty($options['iconNamespace'])) {
			$namespace = $this->detectNamespace($icon);
			if ($namespace) {
				$options['iconNamespace'] = $namespace;
				$options['autoPrefix'] = false;
				$icon = substr($icon, strlen($namespace) + 1);
			}
		}

		if (!isset($attributes['title'])) {
			if (isset($options['title'])) {
				$attributes['title'] = $options['title'];
			} else {
				$attributes['title'] = Inflector::humanize($icon);
			}
		}

		return $this->_fontIcon($type, $options, $attributes);
	}
public function icon($icon, array $options = [], array $attributes = []) {
		if (!$icon) {
			return '';
		}

		$defaults = [
			'translate' => true,
		];
		$options += $defaults;

		$type = $icon;
		if ($this->getConfig('autoPrefix') && empty($options['iconNamespace'])) {
			$namespace = $this->detectNamespace($icon);
			if ($namespace) {
				$options['iconNamespace'] = $namespace;
				$options['autoPrefix'] = false;
				$icon = substr($icon, strlen($namespace) + 1);
			}
		}

		if (!isset($attributes['title'])) {
			if (isset($options['title'])) {
				$attributes['title'] = $options['title'];
			} else {
				$attributes['title'] = Inflector::humanize($icon);
			}
		}

		return $this->_fontIcon($type, $options, $attributes);
	}
public function icon ( $ icon , array $ options = [ ] , array $ attributes = [ ] ) { if ( ! $ icon ) { return '' ; } $ defaults = [ 'translate' => true , ] ; $ options += $ defaults ; $ type = $ icon ; if ( $ this -> getConfig ( 'autoPrefix' ) && empty ( $ options [ 'iconNamespace' ] ) ) { $ namespace = $ this -> detectNamespace ( $ icon ) ; if ( $ namespace ) { $ options [ 'iconNamespace' ] = $ namespace ; $ options [ 'autoPrefix' ] = false ; $ icon = substr ( $ icon , strlen ( $ namespace ) + 1 ) ; } } if ( ! isset ( $ attributes [ 'title' ] ) ) { if ( isset ( $ options [ 'title' ] ) ) { $ attributes [ 'title' ] = $ options [ 'title' ] ; } else { $ attributes [ 'title' ] = Inflector :: humanize ( $ icon ) ; } } return $ this -> _fontIcon ( $ type , $ options , $ attributes ) ; }
Icons using the default namespace or an already prefixed one.

@param string $icon (constant or filename)
@param array $options :
- translate, title, ...
@param array $attributes :
- class, ...
@return string
Icons using the default namespace or an already prefixed one .