Public Member Functions | |
getAllOptions () | |
getOptionText ($value) | |
getFlatColums () | |
getFlatUpdateSelect ($store) |
Definition at line 35 of file View.php.
getAllOptions | ( | ) |
Retrieve All options
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
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
int | $store |
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
string|integer | $value |
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 }