You are here

public function CurrencyImporterInterface::importByCountry in Price 2.x

Same name and namespace in other branches
  1. 8 src/CurrencyImporterInterface.php \Drupal\price\CurrencyImporterInterface::importByCountry()
  2. 3.x src/CurrencyImporterInterface.php \Drupal\price\CurrencyImporterInterface::importByCountry()
  3. 2.0.x src/CurrencyImporterInterface.php \Drupal\price\CurrencyImporterInterface::importByCountry()
  4. 3.0.x src/CurrencyImporterInterface.php \Drupal\price\CurrencyImporterInterface::importByCountry()

Imports currency data for the given country code.

Parameters

string $country_code: The country code.

Return value

\Drupal\price\Entity\CurrencyInterface|null The saved currency entity or NULL if the given country's currency isn't known.

Throws

\CommerceGuys\Intl\Exception\UnknownCountryException Thrown when the country couldn't be found in the library definitions.

1 method overrides CurrencyImporterInterface::importByCountry()
CurrencyImporter::importByCountry in src/CurrencyImporter.php
Imports currency data for the given country code.

File

src/CurrencyImporterInterface.php, line 45

Class

CurrencyImporterInterface
Imports the library-provided currency data into config entities.

Namespace

Drupal\price

Code

public function importByCountry($country_code);