Public Member Functions | |
getAllOptions ($withEmpty=true) | |
getOptionText ($value) |
Definition at line 28 of file Design.php.
getAllOptions | ( | $ | withEmpty = true |
) |
Definition at line 30 of file Design.php.
00031 { 00032 if (is_null($this->_options)) { 00033 $design = Mage::getModel('core/design_package')->getThemeList(); 00034 $options = array(); 00035 foreach ($design as $package=>$themes){ 00036 $packageOption = array('label'=>$package); 00037 $themeOptions = array(); 00038 foreach ($themes as $theme) { 00039 $themeOptions[] = array('label'=>$theme, 'value'=>$package . '/' . $theme); 00040 } 00041 00042 $packageOption['value'] = $themeOptions; 00043 00044 $options[] = $packageOption; 00045 } 00046 $this->_options = $options; 00047 } 00048 00049 $options = $this->_options; 00050 if ($withEmpty) { 00051 array_unshift($options, array('value'=>'', 'label'=>Mage::helper('core')->__('-- Please Select --'))); 00052 } 00053 return $options; 00054 }
getOptionText | ( | $ | value | ) |
Get a text for option value
string|integer | $value |
Reimplemented from Mage_Eav_Model_Entity_Attribute_Source_Abstract.
Definition at line 62 of file Design.php.
00063 { 00064 $options = $this->getAllOptions(false); 00065 00066 return $value; 00067 }