Mage_Adminhtml_JsonController Class Reference

Inheritance diagram for Mage_Adminhtml_JsonController:

Mage_Adminhtml_Controller_Action Mage_Core_Controller_Varien_Action

List of all members.

Public Member Functions

 countryRegionAction ()


Detailed Description

Json controller

Author:
Magento Core Team <core@magentocommerce.com>

Definition at line 32 of file JsonController.php.


Member Function Documentation

countryRegionAction (  ) 

Definition at line 34 of file JsonController.php.

00035     {
00036         $arrRes = array();
00037 
00038         $countryId = $this->getRequest()->getParam('parent');
00039         $arrRegions = Mage::getResourceModel('directory/region_collection')
00040             ->addCountryFilter($countryId)
00041             ->load()
00042             ->toOptionArray();
00043 
00044         if (!empty($arrRegions)) {
00045             foreach ($arrRegions as $region) {
00046                 $arrRes[] = $region;
00047             }
00048         }
00049 
00050         $this->getResponse()->setBody(Zend_Json::encode($arrRes));
00051     }


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

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