Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Ajax_Serializer Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Ajax_Serializer:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 _construct ()
 getProductsJSON ()


Detailed Description

Definition at line 34 of file Serializer.php.


Member Function Documentation

_construct (  ) 

Internal constructor, that is called from real constructor

Please override this one instead of overriding real __construct constructor

Please override this one instead of overriding real __construct constructor

Reimplemented from Mage_Core_Block_Abstract.

Definition at line 36 of file Serializer.php.

00037     {
00038         parent::_construct();
00039         $this->setTemplate('catalog/product/edit/serializer.phtml');
00040         return $this;
00041     }

getProductsJSON (  ) 

Definition at line 43 of file Serializer.php.

00044     {
00045         $result = array();
00046         if ($this->getProducts()) {
00047             $isEntityId = $this->getIsEntityId();
00048             foreach ($this->getProducts() as $product) {
00049                 $id = $isEntityId ? $product->getEntityId() : $product->getId();
00050                 $result[$id] = $product->toArray(array('qty', 'position'));
00051             }
00052         }
00053         return $result ? Zend_Json_Encoder::encode($result) : '{}';
00054     }


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

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