Magento Certified Developer GuideCategory: 5. EAVHow do attribute models, attribute source models, attribute backend models and attribute frontend models relate to each other
Manish Prakash Staff asked 5 years ago

Attribute Model: This is the main model class for each attribute, the base class is “Mage_Eav_Model_Entity_Attribute”. In this class you have functions to get source model, backend model, fronend model for the attribute. There also a _beforeSave() function in this model which can be overwritten.

Source Model: This class is used mainly to fetch default value of an attribute. You can set it to fetch default values from config.xml or database table. This also defines function for flat tables during indexing processes, which we have discussed separately “Mage_Eav_Model_Entity_Attribute_Source_Abstract”

Backend Model: This class is related to database base operation of attribute. This has functions like valiate(), afterSave(), beforeSave(), afterLoad(), etc

Frontend Model: This class is related to frontend display of attribute and how to format data before displaying it.