it has been implemented with Ext.apply and it looks like this:
Code:
applyMixins: function() {
var toApply = {};
Ext.apply(toApply, new MainViewMixins.DefaultMixin());
if (<some condition>) {
Ext.apply(toApply, new MainViewMixins.SomeConditionMixin());
}
if(<some condition 2>) {
Ext.apply(toApply, new MainViewMixins.SomeMixinIf());
} else {
Ext.apply(toApply, new MainViewMixins.SomeMixinElse());
}
Ext.applyIf(this, toApply);
}
that is executed while initComponent is invoking
apply and additional object are used because there are same-named methods in different mixins. And applyIf is used to avoid applying such properties like $base and super.