Mage_Sales_Model_Quote_Item_Option Class Reference

Inheritance diagram for Mage_Sales_Model_Quote_Item_Option:

Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 setItem ($item)
 getItem ()
 setProduct ($product)
 getProduct ()
 __clone ()

Protected Member Functions

 _construct ()
 _beforeSave ()

Protected Attributes

 $_item
 $_product


Detailed Description

Definition at line 34 of file Option.php.


Member Function Documentation

__clone (  ) 

Clone option object

Returns:
Mage_Sales_Model_Quote_Item_Option

Definition at line 111 of file Option.php.

00112     {
00113         $this->setId(null);
00114         $this->_item    = null;
00115         return $this;
00116     }

_beforeSave (  )  [protected]

Initialize item identifier before save data

Returns:
Mage_Sales_Model_Quote_Item_Option

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 98 of file Option.php.

00099     {
00100         if ($this->getItem()) {
00101             $this->setItemId($this->getItem()->getId());
00102         }
00103         return parent::_beforeSave();
00104     }

_construct (  )  [protected]

Initialize resource model

Reimplemented from Varien_Object.

Definition at line 42 of file Option.php.

00043     {
00044         $this->_init('sales/quote_item_option');
00045     }

getItem (  ) 

Get option item

Returns:
Mage_Sales_Model_Quote_Item

Definition at line 65 of file Option.php.

00066     {
00067         return $this->_item;
00068     }

getProduct (  ) 

Get option product

Returns:
Mage_Catalog_Model_Product

Definition at line 88 of file Option.php.

00089     {
00090         return $this->_product;
00091     }

setItem ( item  ) 

Set quote item

Parameters:
Mage_Sales_Model_Quote_Item $item
Returns:
Mage_Sales_Model_Quote_Item_Option

Definition at line 53 of file Option.php.

00054     {
00055         $this->setItemId($item->getId());
00056         $this->_item = $item;
00057         return $this;
00058     }

setProduct ( product  ) 

Set option product

Parameters:
Mage_Catalog_Model_Product $product
Returns:
Mage_Sales_Model_Quote_Item_Option

Definition at line 76 of file Option.php.

00077     {
00078         $this->setProductId($product->getId());
00079         $this->_product = $product;
00080         return $this;
00081     }


Member Data Documentation

$_item [protected]

Definition at line 36 of file Option.php.

$_product [protected]

Definition at line 37 of file Option.php.


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

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