Public Member Functions | |
toOptionArray ($noEmpty=false, $country=null) | |
Protected Attributes | |
$_options |
Definition at line 28 of file Region.php.
toOptionArray | ( | $ | noEmpty = false , |
|
$ | country = null | |||
) |
Definition at line 32 of file Region.php.
00033 { 00034 $options = Mage::getModel('directory/region') 00035 ->getCollection() 00036 ->addCountryFilter($country) 00037 ->toOptionArray(); 00038 00039 if ($noEmpty) { 00040 unset($options[0]); 00041 } else { 00042 if ($options) { 00043 $options[0]['label'] = '*'; 00044 } else { 00045 $options = array(array('value'=>'', 'label'=>'*')); 00046 } 00047 } 00048 00049 return $options; 00050 }
$_options [protected] |
Definition at line 30 of file Region.php.