Mage_Adminhtml_Model_System_Config_Clone_Media_Image Class Reference

Inheritance diagram for Mage_Adminhtml_Model_System_Config_Clone_Media_Image:

Mage_Core_Model_Config_Data Mage_Core_Model_Abstract Varien_Object

List of all members.

Public Member Functions

 getPrefixes ()


Detailed Description

Definition at line 35 of file Image.php.


Member Function Documentation

getPrefixes (  ) 

Get fields prefixes

Returns:
array

Definition at line 43 of file Image.php.

00044     {
00045         //$entityType = Mage::getModel('eav/entity_type');
00046         /* @var $entityType Mage_Eav_Model_Entity_Type */
00047         //$entityTypeId = $entityType->loadByCode('catalog_product')->getEntityTypeId();
00048 
00049         // use cached eav config
00050         $entityTypeId = Mage::getSingleton('eav/config')->getEntityType('catalog_product')->getId();
00051 
00052         $collection = Mage::getModel('eav/entity_attribute')->getCollection();
00053         /* @var $collection Mage_Eav_Model_Mysql4_Entity_Attribute_Collection */
00054         $collection->setEntityTypeFilter($entityTypeId);
00055         $collection->setFrontendInputTypeFilter('media_image');
00056 
00057         $prefixes = array();
00058 
00059         foreach ($collection as $attribute) {
00060             /* @var $attribute Mage_Eav_Model_Entity_Attribute */
00061             $prefixes[] = array(
00062                 'field' => $attribute->getAttributeCode() . '_',
00063                 'label' => $attribute->getFrontend()->getLabel(),
00064             );
00065         }
00066 
00067         return $prefixes;
00068     }


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

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