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