Mage_Core_Model_Design_Source_Design Class Reference

Inheritance diagram for Mage_Core_Model_Design_Source_Design:

Mage_Eav_Model_Entity_Attribute_Source_Abstract Mage_Eav_Model_Entity_Attribute_Source_Interface

List of all members.

Public Member Functions

 getAllOptions ($withEmpty=true)
 getOptionText ($value)


Detailed Description

Definition at line 28 of file Design.php.


Member Function Documentation

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

Parameters:
string|integer $value
Returns:
string

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     }


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

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