*/ class Mage_Catalog_Model_Entity_Attribute extends Mage_Eav_Model_Entity_Attribute { protected $_eventPrefix = 'catalog_entity_attribute'; protected $_eventObject = 'attribute'; const MODULE_NAME = 'Mage_Catalog'; /** * Processing object before save data * * @return Mage_Core_Model_Abstract */ protected function _beforeSave() { if ($this->_getResource()->isUsedBySuperProducts($this)) { throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('This attribute is used in configurable products')); } $this->setData('modulePrefix', self::MODULE_NAME); return parent::_beforeSave(); } /** * Processing object after save data * * @return Mage_Core_Model_Abstract */ protected function _afterSave() { /** * Fix saving attribute in admin */ Mage::getSingleton('eav/config')->clear(); return parent::_afterSave(); } }