public function CountryManager::getZoneList in Ubercart 8.4
Returns a list of zone code => zone name pairs for the specified country.
Parameters
string $alpha_2: The two-character ISO 3166 country code.
Return value
array An array of zone code => zone name pairs.
Overrides CountryManagerInterface::getZoneList
File
- uc_country/
src/ CountryManager.php, line 124
Class
- CountryManager
- Provides list of countries.
Namespace
Drupal\uc_countryCode
public function getZoneList($alpha_2) {
if ($country = $this->entityTypeManager
->getStorage('uc_country')
->load($alpha_2)) {
return $country
->getZones();
}
return [];
}