public function CurrencyRepository::getList in Commerce Core 8.2
File
- modules/
price/ src/ Repository/ CurrencyRepository.php, line 71
Class
- CurrencyRepository
- Defines the currency repository.
Namespace
Drupal\commerce_price\RepositoryCode
public function getList($locale = NULL) {
$list = [];
/** @var \Drupal\commerce_price\Entity\CurrencyInterface[] $entities */
$currencies = $this->currencyStorage
->loadMultiple();
foreach ($currencies as $currency_code => $currency) {
$list[$currency_code] = $currency
->getName();
}
return $list;
}