You are here

public function CountryManager::getCountry in Ubercart 8.4

Returns the uc_country config entity with the specified country code.

Parameters

string $alpha_2: The two-character ISO 3166 country code.

Return value

\Drupal\uc_country\Entity\Country The uc_country config entity with the specified country code.

Overrides CountryManagerInterface::getCountry

File

uc_country/src/CountryManager.php, line 102

Class

CountryManager
Provides list of countries.

Namespace

Drupal\uc_country

Code

public function getCountry($alpha_2) {
  return $this->entityTypeManager
    ->getStorage('uc_country')
    ->load($alpha_2);
}