How to get name of a class that is being extended

patryks picture patryks · Aug 6, 2012 · Viewed 7.9k times · Source

I have couple of grids that extend AbstractFormGrid. Having an object (that could be grid or not) how to check if this object extends AbstractFormGrid. I managed to get object class name using Ext.getName(object) or object.self.getName() but i am unable to get"parent" class.

Answer

Izhaki picture Izhaki · Aug 6, 2012

The property this.superclass will return the parent class.

And as you mentioned this works:

Ext.getClass(object).superclass.self.getName()