Back to PhocacartRenderIcon class

Method getClass

public static
getClass
(mixed $name = '')

Method getClass - Source code

/*
 * @deprecated
 */
public static function getClass($name = '')
{
    self::$i++;
    if (self::$iconType == '') {
        $pC = PhocacartUtils::getComponentParameters();
        $pos = PhocacartPos::isPos();
        if ($pos) {
            self::$iconType = 'bs';
        } else {
            self::$iconType = $pC->get('icon_type', 'bs');
        }
    }
    switch (self::$iconType) {
        case 'fa':
            $iconP = 'fa fa-';
            $iconS = ' fa-fw';
            $iconA = array('view-category' => 'search', 'view-product' => 'search', 'back-category' => 'arrow-left', 'ok' => 'check', 'not-ok' => 'remove', 'remove' => 'remove', 'clear' => 'remove', 'edit' => 'edit', 'plus' => 'plus', 'minus' => 'minus', 'chevron-up' => 'chevron-up', 'chevron-down' => 'chevron-down', 'shopping-cart' => 'shopping-bag', 'question-sign' => 'question-circle', 'info-sign' => 'info-circle', 'compare' => 'clone', 'ext-link' => 'share', 'int-link' => 'share-alt', 'download' => 'download', 'quick-view' => 'eye', 'wish-list' => 'heart', 'ban' => 'ban', 'refresh' => 'refresh', 'trash' => 'trash', 'triangle-bottom' => 'caret-down', 'triangle-right' => 'caret-right', 'save' => 'save', 'user' => 'user', 'grid' => 'th-large', 'gridlist' => 'th-list', 'list' => 'align-justify', 'next' => 'arrow-right', 'prev' => 'arrow-left', 'submit' => 'ok', 'invoice' => 'list-alt fa-file-invoice-dollar', 'del-note' => 'barcode fa-file-invoice', 'order' => 'search fa-file-alt', 'receipt' => 'th-list fa-receipt', 'print' => 'print', 'barcode' => 'barcode', 'search' => 'search', 'payment-method' => 'credit-card', 'shipping-method' => 'barcode', 'log-out' => 'sign-out-alt', 'calendar' => 'calendar');
            break;
        case 'bs':
        default:
            $iconP = 'glyphicon glyphicon-';
            $iconS = '';
            $iconA = array('view-category' => 'search', 'view-product' => 'search', 'back-category' => 'arrow-left', 'ok' => 'ok', 'not-ok' => 'remove', 'remove' => 'remove', 'clear' => 'remove', 'edit' => 'edit', 'plus' => 'plus', 'minus' => 'minus', 'chevron-up' => 'chevron-up', 'chevron-down' => 'chevron-down', 'shopping-cart' => 'shopping-cart', 'question-sign' => 'question-sign', 'info-sign' => 'info-sign', 'compare' => 'stats', 'ext-link' => 'share', 'int-link' => 'share-alt', 'download' => 'download', 'quick-view' => 'eye-open', 'wish-list' => 'heart', 'ban' => 'ban-circle', 'refresh' => 'refresh', 'trash' => 'trash', 'triangle-bottom' => 'triangle-bottom', 'triangle-right' => 'triangle-right', 'save' => 'floppy-disk', 'user' => 'user', 'grid' => 'th-large', 'gridlist' => 'th-list', 'list' => 'align-justify', 'next' => 'arrow-right', 'prev' => 'arrow-left', 'submit' => 'ok', 'invoice' => 'list-alt', 'del-note' => 'barcode', 'order' => 'search', 'receipt' => 'th-list', 'print' => 'print', 'barcode' => 'barcode', 'search' => 'search', 'payment-method' => 'credit-card', 'shipping-method' => 'barcode', 'log-out' => 'arrow-left', 'calendar' => 'calendar');
            break;
    }
    if (isset($iconA[$name]) && $iconA[$name] != '') {
        return $iconP . $iconA[$name] . $iconS;
    } else {
        return $iconP . htmlspecialchars(strip_tags($name)) . $iconS;
    }
}