You are here

public function CurrencyImporterInterface::import in Commerce Core 8.2

Imports currency data for the given currency code.

Parameters

string $currency_code: The currency code.

Return value

\Drupal\commerce_price\Entity\CurrencyInterface The saved currency entity.

Throws

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

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

File

modules/price/src/CurrencyImporterInterface.php, line 30

Class

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

Namespace

Drupal\commerce_price

Code

public function import($currency_code);