Mage_GiftMessage_Model_Entity_Attribute_Backend_Boolean_Config Class Reference

Inheritance diagram for Mage_GiftMessage_Model_Entity_Attribute_Backend_Boolean_Config:

Mage_Eav_Model_Entity_Attribute_Backend_Abstract Mage_Eav_Model_Entity_Attribute_Backend_Interface

List of all members.

Public Member Functions

 afterLoad ($object)
 beforeSave ($object)


Detailed Description

Definition at line 35 of file Config.php.


Member Function Documentation

afterLoad ( object  ) 

Set attribute default value if value empty

Parameters:
Varien_Object $object

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.

Definition at line 42 of file Config.php.

00043     {
00044         if(!$object->hasData($this->getAttribute()->getAttributeCode())) {
00045             $object->setData($this->getAttribute()->getAttributeCode(), $this->getDefaultValue());
00046         }
00047     }

beforeSave ( object  ) 

Set attribute default value if value empty

Parameters:
Varien_Object $object

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.

Definition at line 54 of file Config.php.

00055     {
00056         if($object->hasData($this->getAttribute()->getAttributeCode())
00057             && $object->getData($this->getAttribute()->getAttributeCode()) == $this->getDefaultValue()) {
00058             $object->unsData($this->getAttribute()->getAttributeCode());
00059         }
00060     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:13 2009 for Magento by  doxygen 1.5.8