function(component, defaultType) {
        if (component.isComponent) {
            return component;
        }
        else if (Ext.isString(component)) {
            return Ext.createByAlias('widget.' + component);
        }
        else {
            var type = component.xtype || defaultType;

            return Ext.createByAlias('widget.' + type, component);
        }
    }
function(component, defaultType) {
        if (component.isComponent) {
            return component;
        }
        else if (Ext.isString(component)) {
            return Ext.createByAlias('widget.' + component);
        }
        else {
            var type = component.xtype || defaultType;

            return Ext.createByAlias('widget.' + type, component);
        }
    }
function ( component , defaultType ) { if ( component . isComponent ) { return component ; } else if ( Ext . isString ( component ) ) { return Ext . createByAlias ( 'widget.' + component ) ; } else { var type = component . xtype || defaultType ; return Ext . createByAlias ( 'widget.' + type , component ) ; } }
Creates a new Component from the specified config object using the
config object's `xtype` to determine the class to instantiate.
@param {Object} component A configuration object for the Component you wish to create.
@param {Function} [defaultType] The constructor to provide the default Component type if
the config object does not contain a `xtype`. (Optional if the config contains an `xtype`).
@return {Ext.Component} The newly instantiated Component.
Creates a new Component from the specified config object using the config object s xtype to determine the class to instantiate .