Mage_Catalog_Model_Product_Attribute_Backend_Startdate Class Reference

Inheritance diagram for Mage_Catalog_Model_Product_Attribute_Backend_Startdate:

Mage_Eav_Model_Entity_Attribute_Backend_Datetime Mage_Eav_Model_Entity_Attribute_Backend_Abstract Mage_Eav_Model_Entity_Attribute_Backend_Interface

List of all members.

Public Member Functions

 beforeSave ($object)


Detailed Description

Definition at line 36 of file Startdate.php.


Member Function Documentation

beforeSave ( object  ) 

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Datetime.

Definition at line 38 of file Startdate.php.

00039     {
00040         $attributeName = $this->getAttribute()->getName();
00041 
00042         $startDate = $object->getData($attributeName);
00043 
00044         if ($startDate=='' && $object->getSpecialPrice()) {
00045             $startDate = Mage::app()->getLocale()->date();
00046 //            $startDate = Mage::getModel('core/date')->gmtDate('');
00047         }
00048 
00049         $object->setData($attributeName, $startDate);
00050 
00051         parent::beforeSave($object);
00052 
00053         return $this;
00054     }


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

Generated on Sat Jul 4 17:23:40 2009 for Magento by  doxygen 1.5.8