public function Store::setDefaultCurrency in Commerce Core 8.2
Sets the default store currency.
Parameters
\Drupal\commerce_price\Entity\CurrencyInterface $currency: The default store currency.
Return value
$this
Overrides StoreInterface::setDefaultCurrency
File
- modules/
store/ src/ Entity/ Store.php, line 127
Class
- Store
- Defines the store entity class.
Namespace
Drupal\commerce_store\EntityCode
public function setDefaultCurrency(CurrencyInterface $currency) {
$this
->set('default_currency', $currency
->getCurrencyCode());
return $this;
}