WellCommerce\Bundle\ShippingBundle\Entity\ShippingMethod::setCurrency PHP Method

setCurrency() public method

public setCurrency ( WellCommerce\Bundle\CurrencyBundle\Entity\CurrencyInterface $currency )
$currency WellCommerce\Bundle\CurrencyBundle\Entity\CurrencyInterface
    public function setCurrency(CurrencyInterface $currency)
    {
        $this->currency = $currency;
    }

Usage Example

 public function create() : ShippingMethodInterface
 {
     $shippingMethod = new ShippingMethod();
     $shippingMethod->setCosts($this->createEmptyCollection());
     $shippingMethod->setEnabled(true);
     $shippingMethod->setHierarchy(0);
     $shippingMethod->setCurrency(null);
     $shippingMethod->setTax(null);
     $shippingMethod->setCalculator('');
     $shippingMethod->setCountries([]);
     $shippingMethod->setOptionsProvider('');
     return $shippingMethod;
 }