lib/Ext/Component.js
function(className, /* private */ force) {
        var oldCls = this.getCls(),
            newCls = (oldCls) ? oldCls.slice() : [];

        if (force || newCls.indexOf(className) == -1) {
            newCls.push(className);
        } else {
            Ext.Array.remove(newCls, className);
        }

        this.setCls(newCls);

        return this;
    }
function(className, /* private */ force) {
        var oldCls = this.getCls(),
            newCls = (oldCls) ? oldCls.slice() : [];

        if (force || newCls.indexOf(className) == -1) {
            newCls.push(className);
        } else {
            Ext.Array.remove(newCls, className);
        }

        this.setCls(newCls);

        return this;
    }
Add or removes a class based on if the class is already added to the Component.

@param {String} className The class to toggle.
@chainable