By podarok on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0-dev
Introduced in version:
8.0-dev
Description:
Former supported country list was defined as service in D8
Get list of supported contries:
Drupal 7
_location_supported_countries();
Drupal 8
$countries_manager = \Drupal::service('dmaps.location_countries_manager');
$countries_manager->getSupportedList();
Get list of iso 3166 list of countries:
Drupal 7
location_get_iso3166_list();
Drupal 8
\Drupal\dmaps\LocationCountriesManager::getIso3166List()
Rebuild list of supported countries:
Drupal 7
cache_clear_all('location:supported-countries', 'cache');
_location_supported_countries();
Drupal 8
$countries_manager = \Drupal::service('dmaps.location_countries_manager');
$countries_manager->rebuildSupportedList();
Load support for a country:
This function will load support for a country identified by its two-letter ISO code.
Drupal 7
location_load_country($country); // Two-letter ISO code for country.
Drupal 8
\Drupal\dmaps\LocationCountriesManager::locationLoadCountry($country); // Two-letter ISO code for country.
Get the translated name of a country code:
Drupal 7
location_country_name($country); // Two-letter ISO code for country.
Drupal 8
\Drupal\dmaps\LocationCountriesManager::locationCountryName($country); // Two-letter ISO code for country.
Impacts:
Site builders, administrators, editors
Module developers