Magento Class Inheritance List

The Magento class inheritance list below represents classes that are used when extending Magento functionality. This includes when defining new classes and the parent classes that they should extend from.

Blocks

  • Custom blocks should extend the Mage_Core_Block_Template class.
  • The Mage_Core_Block_Template class in turn extends the Mage_Core_Block_Abstract class.
  • Mage_Core_Block_Abstract also extends the Varien_Object class.

Helpers

  • Custom helpers should extend the Mage_Core_Helper_Abstract class.

Models

  • Custom models should extend Mage_Core_Model_Abstract.
  • Mage_Core_Model_Abstract extends Varien_Object.

Resource Models

  • Custom resource models extend Mage_Core_Model_Resource_Db_Abstract.

EAV Resource Models

  • Custom EAV resource models extend Mage_Eav_Model_Entity_Abstract.

Collections

  • Custom collections extend Mage_Core_Model_Resource_Db_Collection_Abstract.

EAV Collections

  • Custom EAV collections extend Mage_Eav_Model_Entity_Collection_Abstract.

Controllers

  • Custom frontend controllers extend Mage_Core_Controller_Front_Action.
  • Custom adminhtml controllers extend Mage_Adminhtml_Controller_Action.
  • Both Mage_Core_Controller_Front_Action and Mage_Adminhtml_Controller_Action extend Mage_Core_Controller_Varien_Action.

Adminhtml Grids

  • Custom adminhtml grid containers should extend Mage_Adminhtml_Block_Widget_Grid_Container.
  • Custom adminhtml grid should extend Mage_Adminhtml_Block_Widget_Grid.

Adminhtml Forms

  • Custom adminhtml form containers should extend Mage_Adminhtml_Block_Widget_Form_Container
  • Custom adminhtml forms should extend Mage_Adminhtml_Block_Widget_Form.

Setup Scripts

  • Non EAV setup scripts extend Mage_Core_Model_Resource_Setup, although this class is referenced in config.xml within a pair of class nodes within the pair of resources nodes.
  • EAV setup scripts should specify the Mage_Eav_Model_Entity_Setup class.
  • Catalog specific setup scripts should specify the Mage_Catalog_Model_Resource_Setup class.
  • Customer specific setup scripts should specify the Mage_Customer_Model_Resource_Setup class.

Product Types

  • Custom product types should extend Mage_Catalog_Model_Product_Type_Abstract.

Totals

  • Custom totals should extend Mage_Sales_Model_Quote_Address_Total_Abstract.

Shipping

  • Custom shipping methods should extend Mage_Shipping_Model_Carrier_Abstract and implement Mage_Shipping_Model_Carrier_Interface.

Payment

  • Custom payment methods should extend Mage_Payment_Model_Method_Abstract.

Note: This article is based on Magento Community/Open Source version 1.9.