I created custom resource class and I would to use MODx.panel.Resource in my application. But it is not convenient a bit. As I see at Articles extra all items on Articles.panel.Container/Article are just rewritten. They have same functionality of MODx.panel.Resource but totally rewritten. Where is program code reuse?
On the other hand, I can use something like
Ext.extend(myC.panel.Resource,MODx.panel.Resource,{
getFields: function(config) {
var fields = myC.panel.Resource.superclass.getFields(config);
/* Ext.apply here for EVERY item in the fields. This looks horrible and unconvenient too*/
return fields;
}
});
What is the way of writing not awkward and reusable code in back-end?