View/Helper/BootstrapHtmlHelper.php
protected function _icon($title, array $options = [])
    {
        if (empty($options) || !isset($options['icon'])) {
            return $title;
        }
        $options = $options['icon'];

        if (is_array($options)) {
            if (!isset($options['class']) || empty($options['class'])) {
                return $title;
            }
        }
        if (is_string($options)) {
            if (empty($options)) {
                return $title;
            }
            $icon = $this->iconPrefix;
            $options = ["class" => "$icon $icon-$options"];
        }
        $tag = parent::tag('i', '', $options);
        return trim($tag . ' ' . $title);
    }
protected function _icon($title, array $options = [])
    {
        if (empty($options) || !isset($options['icon'])) {
            return $title;
        }
        $options = $options['icon'];

        if (is_array($options)) {
            if (!isset($options['class']) || empty($options['class'])) {
                return $title;
            }
        }
        if (is_string($options)) {
            if (empty($options)) {
                return $title;
            }
            $icon = $this->iconPrefix;
            $options = ["class" => "$icon $icon-$options"];
        }
        $tag = parent::tag('i', '', $options);
        return trim($tag . ' ' . $title);
    }
protected function _icon ( $ title , array $ options = [ ] ) { if ( empty ( $ options ) || ! isset ( $ options [ 'icon' ] ) ) { return $ title ; } $ options = $ options [ 'icon' ] ; if ( is_array ( $ options ) ) { if ( ! isset ( $ options [ 'class' ] ) || empty ( $ options [ 'class' ] ) ) { return $ title ; } } if ( is_string ( $ options ) ) { if ( empty ( $ options ) ) { return $ title ; } $ icon = $ this -> iconPrefix ; $ options = [ "class" => "$icon $icon-$options" ] ; } $ tag = parent :: tag ( 'i' , '' , $ options ) ; return trim ( $ tag . ' ' . $ title ) ; }
Returns an icon element followed by a text.
This function is used for generating an icon for internal functions inside this
helper.

@param  string       $title
@param  string|array $options
@return string
todo We need to refactor this function in order to load an array of icon class with no prefix on the class
Returns an icon element followed by a text . This function is used for generating an icon for internal functions inside this helper .