src/View/Helper/FormatHelper.php
protected function _customIcon($icon, array $options = [], array $attributes = []) {
		$translate = isset($options['translate']) ? $options['translate'] : true;

		$type = pathinfo($icon, PATHINFO_FILENAME);
		$title = ucfirst($type);
		$alt = $this->slug($title);
		if ($translate !== false) {
			$title = __($title);
			$alt = __($alt);
		}
		$alt = '[' . $alt . ']';

		$defaults = ['title' => $title, 'alt' => $alt, 'class' => 'icon'];

		$options = $attributes + $options;
		$options += $defaults;
		if (substr($icon, 0, 1) !== '/') {
			$icon = 'icons/' . $icon;
		}
		return $this->Html->image($icon, $options);
	}
protected function _customIcon($icon, array $options = [], array $attributes = []) {
		$translate = isset($options['translate']) ? $options['translate'] : true;

		$type = pathinfo($icon, PATHINFO_FILENAME);
		$title = ucfirst($type);
		$alt = $this->slug($title);
		if ($translate !== false) {
			$title = __($title);
			$alt = __($alt);
		}
		$alt = '[' . $alt . ']';

		$defaults = ['title' => $title, 'alt' => $alt, 'class' => 'icon'];

		$options = $attributes + $options;
		$options += $defaults;
		if (substr($icon, 0, 1) !== '/') {
			$icon = 'icons/' . $icon;
		}
		return $this->Html->image($icon, $options);
	}
protected function _customIcon ( $ icon , array $ options = [ ] , array $ attributes = [ ] ) { $ translate = isset ( $ options [ 'translate' ] ) ? $ options [ 'translate' ] : true ; $ type = pathinfo ( $ icon , PATHINFO_FILENAME ) ; $ title = ucfirst ( $ type ) ; $ alt = $ this -> slug ( $ title ) ; if ( $ translate !== false ) { $ title = __ ( $ title ) ; $ alt = __ ( $ alt ) ; } $ alt = '[' . $ alt . ']' ; $ defaults = [ 'title' => $ title , 'alt' => $ alt , 'class' => 'icon' ] ; $ options = $ attributes + $ options ; $ options += $ defaults ; if ( substr ( $ icon , 0 , 1 ) !== '/' ) { $ icon = 'icons/' . $ icon ; } return $ this -> Html -> image ( $ icon , $ options ) ; }
Deprecated img icons, font icons should be used instead, but sometimes
we still need a custom img icon.

@param string $icon (constant or filename)
@param array $options :
- translate, title, ...
@param array $attributes :
- class, ...
@return string
Deprecated img icons font icons should be used instead but sometimes we still need a custom img icon .