Mage_Sales_Model_Mysql4_Order_Attribute_Backend_Billing Class Reference

Inheritance diagram for Mage_Sales_Model_Mysql4_Order_Attribute_Backend_Billing:

Mage_Eav_Model_Entity_Attribute_Backend_Abstract Mage_Eav_Model_Entity_Attribute_Backend_Interface

List of all members.

Public Member Functions

 beforeSave ($object)
 afterSave ($object)


Detailed Description

Definition at line 35 of file Billing.php.


Member Function Documentation

afterSave ( object  ) 

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.

Definition at line 46 of file Billing.php.

00047     {
00048         $billingAddressId = false;
00049         foreach ($object->getAddressesCollection() as $address) {
00050             if ('billing' == $address->getAddressType()) {
00051                 $billingAddressId = $address->getId();
00052             }
00053         }
00054         if ($billingAddressId) {
00055             $object->setBillingAddressId($billingAddressId);
00056             $this->getAttribute()->getEntity()->saveAttribute($object, $this->getAttribute()->getAttributeCode());
00057         }
00058     }

beforeSave ( object  ) 

Reimplemented from Mage_Eav_Model_Entity_Attribute_Backend_Abstract.

Definition at line 38 of file Billing.php.

00039     {
00040         $billingAddressId = $object->getBillingAddressId();
00041         if (is_null($billingAddressId)) {
00042             $object->unsetBillingAddressId();
00043         }
00044     }


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

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