You are here

public function CurrencyRepository::getAll in Commerce Core 8.2

File

modules/price/src/Repository/CurrencyRepository.php, line 57

Class

CurrencyRepository
Defines the currency repository.

Namespace

Drupal\commerce_price\Repository

Code

public function getAll($locale = NULL) {
  $all = [];

  /** @var \Drupal\commerce_price\Entity\CurrencyInterface[] $currencies */
  $currencies = $this->currencyStorage
    ->loadMultiple();
  foreach ($currencies as $currency_code => $currency) {
    $all[$currency_code] = $this
      ->createValueObjectFromEntity($currency);
  }
  return $all;
}