src/View/Helper/HtmlHelper.php
public function icon($icon = 'home', array $options = [])
    {
        $iconPref = $this->_configRead('iconPref');
        $_classes = [
            $this->_class(__FUNCTION__),
            $iconPref,
            $iconPref . '-' . $icon,
        ];

        $options = $this->_addClass($options, implode(' ', $_classes));
        $classes = $options['class'];
        unset($options['class']);

        $templater = $this->templater();
        return $templater->format(__FUNCTION__, [
            'class' => $classes,
            'attrs' => $templater->formatAttributes($options),
        ]);
    }
public function icon($icon = 'home', array $options = [])
    {
        $iconPref = $this->_configRead('iconPref');
        $_classes = [
            $this->_class(__FUNCTION__),
            $iconPref,
            $iconPref . '-' . $icon,
        ];

        $options = $this->_addClass($options, implode(' ', $_classes));
        $classes = $options['class'];
        unset($options['class']);

        $templater = $this->templater();
        return $templater->format(__FUNCTION__, [
            'class' => $classes,
            'attrs' => $templater->formatAttributes($options),
        ]);
    }
public function icon ( $ icon = 'home' , array $ options = [ ] ) { $ iconPref = $ this -> _configRead ( 'iconPref' ) ; $ _classes = [ $ this -> _class ( __FUNCTION__ ) , $ iconPref , $ iconPref . '-' . $ icon , ] ; $ options = $ this -> _addClass ( $ options , implode ( ' ' , $ _classes ) ) ; $ classes = $ options [ 'class' ] ; unset ( $ options [ 'class' ] ) ; $ templater = $ this -> templater ( ) ; return $ templater -> format ( __FUNCTION__ , [ 'class' => $ classes , 'attrs' => $ templater -> formatAttributes ( $ options ) , ] ) ; }
Create icon element.

@param   string $icon
@param   array $options
@return  null|string
Create icon element .