WellCommerce\Bundle\ShippingBundle\Entity\ShippingMethodInterface::getCurrency PHP Method

getCurrency() public method

public getCurrency ( ) : WellCommerce\Bundle\CurrencyBundle\Entity\CurrencyInterface
return WellCommerce\Bundle\CurrencyBundle\Entity\CurrencyInterface
    public function getCurrency() : CurrencyInterface;

Usage Example

コード例 #1
0
 public function calculate(ShippingMethodInterface $shippingMethod, ShippingSubjectInterface $subject) : Collection
 {
     $ranges = $shippingMethod->getCosts();
     $baseCurrency = $subject->getCurrency();
     $targetCurrency = $shippingMethod->getCurrency()->getCode();
     $grossAmount = $this->currencyConverter->convert($subject->getGrossPrice(), $baseCurrency, $targetCurrency);
     return $this->filterRanges($ranges, $grossAmount);
 }
All Usage Examples Of WellCommerce\Bundle\ShippingBundle\Entity\ShippingMethodInterface::getCurrency