Mage_Bundle_Model_Product_Attribute_Source_Price_View Class Reference

Inheritance diagram for Mage_Bundle_Model_Product_Attribute_Source_Price_View:

Mage_Eav_Model_Entity_Attribute_Source_Abstract Mage_Eav_Model_Entity_Attribute_Source_Interface

List of all members.

Public Member Functions

 getAllOptions ()
 getOptionText ($value)
 getFlatColums ()
 getFlatUpdateSelect ($store)


Detailed Description

Definition at line 35 of file View.php.


Member Function Documentation

getAllOptions (  ) 

Retrieve All options

Returns:
array

Implements Mage_Eav_Model_Entity_Attribute_Source_Interface.

Definition at line 37 of file View.php.

00038     {
00039         if (is_null($this->_options)) {
00040             $this->_options = array(
00041                 array(
00042                     'label' => Mage::helper('bundle')->__('As low as'),
00043                     'value' =>  1
00044                 ),
00045                 array(
00046                     'label' => Mage::helper('bundle')->__('Price Range'),
00047                     'value' =>  0
00048                 ),
00049             );
00050         }
00051         return $this->_options;
00052     }

getFlatColums (  ) 

Get Column(s) names for flat data building

Returns:
array

Reimplemented from Mage_Eav_Model_Entity_Attribute_Source_Abstract.

Definition at line 76 of file View.php.

00077     {
00078         $columns = array();
00079         $columns[$this->getAttribute()->getAttributeCode()] = array(
00080             'type'      => 'int',
00081             'unsigned'  => false,
00082             'is_null'   => true,
00083             'default'   => null,
00084             'extra'     => null
00085         );
00086         return $columns;
00087    }

getFlatUpdateSelect ( store  ) 

Retrieve Select for update Attribute value in flat table

Parameters:
int $store
Returns:
Varien_Db_Select|null

Reimplemented from Mage_Eav_Model_Entity_Attribute_Source_Abstract.

Definition at line 95 of file View.php.

00096     {
00097         return Mage::getResourceModel('eav/entity_attribute_option')
00098             ->getFlatUpdateSelect($this->getAttribute(), $store, false);
00099     }

getOptionText ( value  ) 

Get a text for option value

Parameters:
string|integer $value
Returns:
string

Reimplemented from Mage_Eav_Model_Entity_Attribute_Source_Abstract.

Definition at line 60 of file View.php.

00061     {
00062         $options = $this->getAllOptions();
00063         foreach ($options as $option) {
00064             if ($option['value'] == $value) {
00065                 return $option['label'];
00066             }
00067         }
00068         return false;
00069     }


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

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