Mage_Adminhtml_Model_System_Config_Source_Product_Options_Type Class Reference

List of all members.

Public Member Functions

 toOptionArray ()

Public Attributes

const PRODUCT_OPTIONS_GROUPS_PATH = 'global/catalog/product/options/custom/groups'


Detailed Description

Definition at line 34 of file Type.php.


Member Function Documentation

toOptionArray (  ) 

Definition at line 38 of file Type.php.

00039     {
00040         $groups = array(
00041             array('value' => '', 'label' => Mage::helper('adminhtml')->__('-- Please select --'))
00042         );
00043 
00044         foreach (Mage::getConfig()->getNode(self::PRODUCT_OPTIONS_GROUPS_PATH)->children() as $group) {
00045             $types = array();
00046             $typesPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types';
00047             foreach (Mage::getConfig()->getNode($typesPath)->children() as $type) {
00048                 $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types/' . $type->getName() . '/label';
00049                 $types[] = array(
00050                     'label' => (string) Mage::getConfig()->getNode($labelPath),
00051                     'value' => $type->getName()
00052                 );
00053             }
00054 
00055             $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/label';
00056 
00057             $groups[] = array(
00058                 'label' => (string) Mage::getConfig()->getNode($labelPath),
00059                 'value' => $types
00060             );
00061         }
00062 
00063         return $groups;
00064     }


Member Data Documentation

const PRODUCT_OPTIONS_GROUPS_PATH = 'global/catalog/product/options/custom/groups'

Definition at line 36 of file Type.php.


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

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