Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid_Renderer_Checkbox Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid_Renderer_Checkbox:

Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract Mage_Adminhtml_Block_Abstract Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 render (Varien_Object $row)
 getAttributesJson (Varien_Object $row)


Detailed Description

Definition at line 35 of file Checkbox.php.


Member Function Documentation

getAttributesJson ( Varien_Object row  ) 

Definition at line 49 of file Checkbox.php.

00050     {
00051         if(!$this->getColumn()->getAttributes()) {
00052             return '[]';
00053         }
00054 
00055         $result = array();
00056         foreach($this->getColumn()->getAttributes() as $attribute) {
00057             $productAttribute = $attribute->getProductAttribute();
00058             if($productAttribute->getSourceModel()) {
00059                 $label = $productAttribute->getSource()->getOptionText($row->getData($productAttribute->getAttributeCode()));
00060             } else {
00061                 $label = $row->getData($productAttribute->getAttributeCode());
00062             }
00063             $item = array();
00064             $item['label']        = $label;
00065             $item['attribute_id'] = $productAttribute->getId();
00066             $item['value_index']  = $row->getData($productAttribute->getAttributeCode());
00067             $result[] = $item;
00068         }
00069 
00070         return Zend_Json::encode($result);
00071     }

render ( Varien_Object row  ) 

Renders grid column

Parameters:
Varien_Object $row
Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox.

Definition at line 43 of file Checkbox.php.

00044     {
00045         $result = parent::render($row);
00046         return $result.'<input type="hidden" class="value-json" value="'.htmlspecialchars($this->getAttributesJson($row)).'" />';
00047     }


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

Generated on Sat Jul 4 17:22:45 2009 for Magento by  doxygen 1.5.8