public function CurrencyRepository::getList in Price 8
Same name and namespace in other branches
- 3.x src/Repository/CurrencyRepository.php \Drupal\price\Repository\CurrencyRepository::getList()
- 2.0.x src/Repository/CurrencyRepository.php \Drupal\price\Repository\CurrencyRepository::getList()
- 2.x src/Repository/CurrencyRepository.php \Drupal\price\Repository\CurrencyRepository::getList()
- 3.0.x src/Repository/CurrencyRepository.php \Drupal\price\Repository\CurrencyRepository::getList()
File
- src/
Repository/ CurrencyRepository.php, line 70
Class
- CurrencyRepository
- Defines the currency repository.
Namespace
Drupal\price\RepositoryCode
public function getList($locale = NULL) {
$list = [];
/** @var \Drupal\price\Entity\CurrencyInterface[] $entities */
$currencies = $this->currencyStorage
->loadMultiple();
foreach ($currencies as $currency_code => $currency) {
$list[$currency_code] = $currency
->getName();
}
return $list;
}