BaseBuild.js revision 9f74fe13660a0d9d411c97798c85863de1745bbf
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental * The base-build submodule provides Base.build functionality, which
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental * can be used to create custom classes, by aggregating extensions onto
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental * a main class.
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental * @module base
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental * @submodule base-build
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental * @for Base
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental Base._build = function(name, main, extensions, px, sx, cfg) {
526c8bf9bb41b582dc49f54ac192705de9e2edf2mental // Prototype, old non-displacing augment
648401434273d7165b6346f9d04675b138464d2fKris // Custom Statics
648401434273d7165b6346f9d04675b138464d2fKris // Extension Statics
if (dynamic) {
return builtClass;
var aggregates,
val,
if (cfg) {
if (statics) {
if (aggregates) {
if (isExt) {
if (custom) {
for (j in custom) {
custom[j](j, r, s);
function BuiltClass() {
return BuiltClass;
if (!buildCfg) {
return builtClass;
var aggr = [],
cust = {},
c = main;
while (c && c.prototype) {
if (buildCfg) {
if (cfgAggr) {
if (cfgCustBuild) {
return sxclone;
* @param {Function} name The name of the new class. Used to defined the NAME property for the new class.
* augmented/aggregated to the built class.
* <p>Creates a new class (constructor function) which extends the base class passed in as the second argument,
* <p>Prototype properties or methods can be added to the new class, using the px argument (similar to Y.extend).</p>
* <p>Static properties or methods can be added to the new class, using the sx argument (similar to Y.extend).</p>
* @param {Function} name The name of the newly created class. Used to defined the NAME property for the new class.
* @param {Function} main The base class which the new class should extend. This class needs to be Base or a class derived from base (e.g. Widget).
* @param {Object} px The set of prototype properties/methods to add to the built class.
* @param {Object} sx The set of static properties/methods to add to the built class.
* @param {Function} main The existing class into which the extensions should be mixed. The class needs to be Base or a class derived from Base (e.g. Widget)
* @param {Function[]} extensions The set of extension classes which will mixed into the existing main class.
custom : {
if (s.ATTRS) {
for (a in sAttrs) {