
Public Member Functions | |
| setAttribute ($attribute) | |
| getAttribute () | |
| getOptionText ($value) | |
| getOptionId ($value) | |
| addValueSortToCollection ($collection, $dir= 'asc') | |
| getFlatColums () | |
| getFlatIndexes () | |
| getFlatUpdateSelect ($store) | |
Protected Attributes | |
| $_attribute | |
| $_options | |
Definition at line 35 of file Abstract.php.
| addValueSortToCollection | ( | $ | collection, | |
| $ | dir = 'asc' | |||
| ) |
Add Value Sort To Collection Select
| Mage_Eav_Model_Entity_Collection_Abstract | $collection | |
| string | $dir direction |
Reimplemented in Mage_Eav_Model_Entity_Attribute_Source_Table.
Definition at line 111 of file Abstract.php.
| getAttribute | ( | ) |
| getFlatColums | ( | ) |
Retrieve Column(s) for Flat
Reimplemented in Mage_Bundle_Model_Product_Attribute_Source_Price_View, Mage_Eav_Model_Entity_Attribute_Source_Boolean, Mage_Eav_Model_Entity_Attribute_Source_Table, and Mage_Tax_Model_Class_Source_Product.
Definition at line 120 of file Abstract.php.
00121 { 00122 return array(); 00123 }
| getFlatIndexes | ( | ) |
Retrieve Indexes(s) for Flat
Reimplemented in Mage_Eav_Model_Entity_Attribute_Source_Boolean, and Mage_Eav_Model_Entity_Attribute_Source_Table.
Definition at line 130 of file Abstract.php.
00131 { 00132 return array(); 00133 }
| getFlatUpdateSelect | ( | $ | store | ) |
Retrieve Select For Flat Attribute update
| int | $store |
Reimplemented in Mage_Bundle_Model_Product_Attribute_Source_Price_View, Mage_Eav_Model_Entity_Attribute_Source_Boolean, Mage_Eav_Model_Entity_Attribute_Source_Table, and Mage_Tax_Model_Class_Source_Product.
Definition at line 141 of file Abstract.php.
| getOptionId | ( | $ | value | ) |
Definition at line 94 of file Abstract.php.
00095 { 00096 foreach ($this->getAllOptions() as $option) { 00097 if (strcasecmp($option['label'], $value)==0 || $option['value'] == $value) { 00098 return $option['value']; 00099 } 00100 } 00101 return null; 00102 }
| getOptionText | ( | $ | value | ) |
Get a text for option value
| string|integer | $value |
Implements Mage_Eav_Model_Entity_Attribute_Source_Interface.
Reimplemented in Mage_Bundle_Model_Product_Attribute_Source_Price_View, Mage_Catalog_Model_Entity_Product_Attribute_Design_Options_Container, Mage_Core_Model_Design_Source_Design, Mage_Customer_Model_Customer_Attribute_Source_Store, Mage_Customer_Model_Customer_Attribute_Source_Website, Mage_Eav_Model_Entity_Attribute_Source_Boolean, Mage_Eav_Model_Entity_Attribute_Source_Table, and Mage_Tax_Model_Class_Source_Product.
Definition at line 79 of file Abstract.php.
00080 { 00081 $options = $this->getAllOptions(); 00082 // Fixed for tax_class_id and custom_design 00083 if (sizeof($options) > 0) foreach($options as $option) { 00084 if (isset($option['value']) && $option['value'] == $value) { 00085 return $option; 00086 } 00087 } // End 00088 if (isset($options[$value])) { 00089 return $options[$value]; 00090 } 00091 return false; 00092 }
| setAttribute | ( | $ | attribute | ) |
Set attribute instance
| Mage_Eav_Model_Entity_Attribute_Abstract | $attribute |
Definition at line 57 of file Abstract.php.
00058 { 00059 $this->_attribute = $attribute; 00060 return $this; 00061 }
$_attribute [protected] |
Definition at line 42 of file Abstract.php.
$_options [protected] |
Definition at line 49 of file Abstract.php.
1.5.8