You are here

public function CurrencyImporterInterface::import in Price 3.x

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

Imports currency data for the given currency code.

Parameters

string $currency_code: The currency code.

Return value

\Drupal\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 src/CurrencyImporter.php
Imports currency data for the given currency code.

File

src/CurrencyImporterInterface.php, line 30

Class

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

Namespace

Drupal\price

Code

public function import($currency_code);