Mage_Catalog_Model_Product_Type_Configurable_Attribute Class Reference

Inheritance diagram for Mage_Catalog_Model_Product_Type_Configurable_Attribute:

Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 addPrice ($priceData)
 getLabel ()

Protected Member Functions

 _construct ()
 _afterSave ()


Detailed Description

Definition at line 35 of file Attribute.php.


Member Function Documentation

_afterSave (  )  [protected]

After save process

Returns:
Mage_Catalog_Model_Product_Type_Configurable_Attribute

Reimplemented from Mage_Core_Model_Abstract.

Definition at line 91 of file Attribute.php.

00092     {
00093         parent::_afterSave();
00094         $this->_getResource()->saveLabel($this);
00095         $this->_getResource()->savePrices($this);
00096         return $this;
00097     }

_construct (  )  [protected]

Initialize resource model

Reimplemented from Varien_Object.

Definition at line 41 of file Attribute.php.

00042     {
00043         $this->_init('catalog/product_type_configurable_attribute');
00044     }

addPrice ( priceData  ) 

Add price data to attribute

Parameters:
array $priceData
Returns:
Mage_Catalog_Model_Product_Type_Configurable_Attribute

Definition at line 52 of file Attribute.php.

00053     {
00054         $data = $this->getPrices();
00055         if (is_null($data)) {
00056             $data = array();
00057         }
00058         $data[] = $priceData;
00059         $this->setPrices($data);
00060         return $this;
00061     }

getLabel (  ) 

Retrieve label

Returns:
string

Definition at line 68 of file Attribute.php.

00069     {
00070         if (is_null($this->getData('label')) && $this->getProductAttribute()) {
00071             // If no attribute label seted
00072             $this->setData('label', $this->getProductAttribute()->getFrontend()->getLabel());
00073         }
00074 
00075         return $this->getData('label');
00076     }


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

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