lib/packages/core.js
function(extends_title, config, properties) {

		var widget_config = this.getWidgetConfig(extends_title),
			constructor;

		if (config) {

			if (Lava.schema.DEBUG && config['extends'] && config['extends'] != extends_title) Lava.t("Malformed widget config");

			config['extends'] = extends_title;
			Lava.extenders[config.extender_type || widget_config.extender_type](config);

		} else {

			// all widgets from schema must have their class present
			config = widget_config;

		}

		constructor = Lava.ClassManager.getConstructor(config['class']);
		if (Lava.schema.DEBUG && !constructor) Lava.t('Class not found: ' + class_name);
		return /** @type {Lava.widget.Standard} */ new constructor(config, null, null, null, properties);

	}
function(extends_title, config, properties) {

		var widget_config = this.getWidgetConfig(extends_title),
			constructor;

		if (config) {

			if (Lava.schema.DEBUG && config['extends'] && config['extends'] != extends_title) Lava.t("Malformed widget config");

			config['extends'] = extends_title;
			Lava.extenders[config.extender_type || widget_config.extender_type](config);

		} else {

			// all widgets from schema must have their class present
			config = widget_config;

		}

		constructor = Lava.ClassManager.getConstructor(config['class']);
		if (Lava.schema.DEBUG && !constructor) Lava.t('Class not found: ' + class_name);
		return /** @type {Lava.widget.Standard} */ new constructor(config, null, null, null, properties);

	}
function ( extends_title , config , properties ) { var widget_config = this . getWidgetConfig ( extends_title ) , constructor ; if ( config ) { if ( Lava . schema . DEBUG && config [ 'extends' ] && config [ 'extends' ] != extends_title ) Lava . t ( "Malformed widget config" ) ; config [ 'extends' ] = extends_title ; Lava . extenders [ config . extender_type || widget_config . extender_type ] ( config ) ; } else { // all widgets from schema must have their class present config = widget_config ; } constructor = Lava . ClassManager . getConstructor ( config [ 'class' ] ) ; if ( Lava . schema . DEBUG && ! constructor ) Lava . t ( 'Class not found: ' + class_name ) ; return /** @type {Lava.widget.Standard} */ new constructor ( config , null , null , null , properties ) ; }
Create a root widget instance
@param {string} extends_title Name of global parent widget
@param {_cWidget} [config] Partial config for new widget, will be extended with parent's config
@param {Object} [properties] Properties for created widget
@returns {Lava.widget.Standard} Created widget instance
Create a root widget instance