Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/country_states_helper.php
Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Line(s) | |||||
$country_iso = $object->GetDBField($country_field); | $country_iso = $object->GetDBField($country_field); | ||||
if ( !$country_iso ) { | if ( !$country_iso ) { | ||||
return; | return; | ||||
} | } | ||||
$field_options = $object->GetFieldOptions($state_field); | $field_options = $object->GetFieldOptions($state_field); | ||||
$field_options['options'] = $this->getStates($country_iso); | $field_options['options'] = $this->getStates($country_iso); | ||||
$field_options['options'][''] = ''; | |||||
$object->SetFieldOptions($state_field, $field_options, $object->isVirtualField($state_field)); | $object->SetFieldOptions($state_field, $field_options, $object->isVirtualField($state_field)); | ||||
} | } | ||||
/** | /** | ||||
* Returns list of given country states | * Returns list of given country states | ||||
* | * | ||||
* @param string $country_iso | * @param string $country_iso | ||||
* @return Array | * @return Array | ||||
▲ Show 20 Lines • Show All 138 Lines • Show Last 20 Lines |