vendor/shopware/core/System/Currency/CurrencyEntity.php line 19

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System\Currency;
  3. use Shopware\Core\Checkout\Order\OrderCollection;
  4. use Shopware\Core\Checkout\Promotion\Aggregate\PromotionDiscountPrice\PromotionDiscountPriceCollection;
  5. use Shopware\Core\Checkout\Shipping\Aggregate\ShippingMethodPrice\ShippingMethodPriceCollection;
  6. use Shopware\Core\Content\ProductExport\ProductExportCollection;
  7. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  8. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  9. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  10. use Shopware\Core\Framework\DataAbstractionLayer\Pricing\CashRoundingConfig;
  11. use Shopware\Core\Framework\Feature;
  12. use Shopware\Core\System\Currency\Aggregate\CurrencyCountryRounding\CurrencyCountryRoundingCollection;
  13. use Shopware\Core\System\Currency\Aggregate\CurrencyTranslation\CurrencyTranslationCollection;
  14. use Shopware\Core\System\SalesChannel\Aggregate\SalesChannelDomain\SalesChannelDomainCollection;
  15. use Shopware\Core\System\SalesChannel\SalesChannelCollection;
  16. class CurrencyEntity extends Entity
  17. {
  18.     use EntityIdTrait;
  19.     use EntityCustomFieldsTrait;
  20.     /**
  21.      * @var string
  22.      */
  23.     protected $isoCode;
  24.     /**
  25.      * @var float
  26.      */
  27.     protected $factor;
  28.     /**
  29.      * @var string
  30.      */
  31.     protected $symbol;
  32.     /**
  33.      * @var string|null
  34.      */
  35.     protected $shortName;
  36.     /**
  37.      * @var string|null
  38.      */
  39.     protected $name;
  40.     /**
  41.      * @var int
  42.      */
  43.     protected $position;
  44.     /**
  45.      * @var CurrencyTranslationCollection|null
  46.      */
  47.     protected $translations;
  48.     /**
  49.      * @var OrderCollection|null
  50.      */
  51.     protected $orders;
  52.     /**
  53.      * @var SalesChannelCollection|null
  54.      */
  55.     protected $salesChannels;
  56.     /**
  57.      * @var SalesChannelCollection|null
  58.      */
  59.     protected $salesChannelDefaultAssignments;
  60.     /**
  61.      * @var SalesChannelDomainCollection|null
  62.      */
  63.     protected $salesChannelDomains;
  64.     /**
  65.      * @var ShippingMethodPriceCollection|null
  66.      */
  67.     protected $shippingMethodPrices;
  68.     /**
  69.      * @var PromotionDiscountPriceCollection
  70.      */
  71.     protected $promotionDiscountPrices;
  72.     /**
  73.      * @var bool|null
  74.      */
  75.     protected $isSystemDefault;
  76.     /**
  77.      * @var ProductExportCollection|null
  78.      */
  79.     protected $productExports;
  80.     /**
  81.      * @var CurrencyCountryRoundingCollection|null
  82.      */
  83.     protected $countryRoundings;
  84.     /**
  85.      * @var CashRoundingConfig
  86.      */
  87.     protected $itemRounding;
  88.     /**
  89.      * @var CashRoundingConfig
  90.      */
  91.     protected $totalRounding;
  92.     /**
  93.      * @var float|null
  94.      */
  95.     protected $taxFreeFrom;
  96.     public function getIsoCode(): string
  97.     {
  98.         return $this->isoCode;
  99.     }
  100.     public function setIsoCode(string $isoCode): void
  101.     {
  102.         $this->isoCode $isoCode;
  103.     }
  104.     public function getFactor(): float
  105.     {
  106.         return $this->factor;
  107.     }
  108.     public function setFactor(float $factor): void
  109.     {
  110.         $this->factor $factor;
  111.     }
  112.     public function getSymbol(): string
  113.     {
  114.         return $this->symbol;
  115.     }
  116.     public function setSymbol(string $symbol): void
  117.     {
  118.         $this->symbol $symbol;
  119.     }
  120.     public function getShortName(): ?string
  121.     {
  122.         return $this->shortName;
  123.     }
  124.     public function setShortName(?string $shortName): void
  125.     {
  126.         $this->shortName $shortName;
  127.     }
  128.     public function getName(): ?string
  129.     {
  130.         return $this->name;
  131.     }
  132.     public function setName(?string $name): void
  133.     {
  134.         $this->name $name;
  135.     }
  136.     public function getPosition(): int
  137.     {
  138.         return $this->position;
  139.     }
  140.     public function setPosition(int $position): void
  141.     {
  142.         $this->position $position;
  143.     }
  144.     public function getTranslations(): ?CurrencyTranslationCollection
  145.     {
  146.         return $this->translations;
  147.     }
  148.     public function setTranslations(CurrencyTranslationCollection $translations): void
  149.     {
  150.         $this->translations $translations;
  151.     }
  152.     public function getOrders(): ?OrderCollection
  153.     {
  154.         return $this->orders;
  155.     }
  156.     public function setOrders(OrderCollection $orders): void
  157.     {
  158.         $this->orders $orders;
  159.     }
  160.     public function getSalesChannels(): ?SalesChannelCollection
  161.     {
  162.         return $this->salesChannels;
  163.     }
  164.     public function setSalesChannels(SalesChannelCollection $salesChannels): void
  165.     {
  166.         $this->salesChannels $salesChannels;
  167.     }
  168.     public function getSalesChannelDefaultAssignments(): ?SalesChannelCollection
  169.     {
  170.         return $this->salesChannelDefaultAssignments;
  171.     }
  172.     public function setSalesChannelDefaultAssignments(SalesChannelCollection $salesChannelDefaultAssignments): void
  173.     {
  174.         $this->salesChannelDefaultAssignments $salesChannelDefaultAssignments;
  175.     }
  176.     public function getSalesChannelDomains(): ?SalesChannelDomainCollection
  177.     {
  178.         return $this->salesChannelDomains;
  179.     }
  180.     public function setSalesChannelDomains(SalesChannelDomainCollection $salesChannelDomains): void
  181.     {
  182.         $this->salesChannelDomains $salesChannelDomains;
  183.     }
  184.     public function getShippingMethodPrices(): ?ShippingMethodPriceCollection
  185.     {
  186.         return $this->shippingMethodPrices;
  187.     }
  188.     public function setShippingMethodPrices(ShippingMethodPriceCollection $shippingMethodPrices): void
  189.     {
  190.         $this->shippingMethodPrices $shippingMethodPrices;
  191.     }
  192.     public function getIsSystemDefault(): ?bool
  193.     {
  194.         return $this->isSystemDefault;
  195.     }
  196.     public function setIsSystemDefault(bool $isSystemDefault): void
  197.     {
  198.         $this->isSystemDefault $isSystemDefault;
  199.     }
  200.     public function getPromotionDiscountPrices(): ?PromotionDiscountPriceCollection
  201.     {
  202.         return $this->promotionDiscountPrices;
  203.     }
  204.     public function setPromotionDiscountPrices(PromotionDiscountPriceCollection $promotionDiscountPrices): void
  205.     {
  206.         $this->promotionDiscountPrices $promotionDiscountPrices;
  207.     }
  208.     public function getProductExports(): ?ProductExportCollection
  209.     {
  210.         return $this->productExports;
  211.     }
  212.     public function setProductExports(ProductExportCollection $productExports): void
  213.     {
  214.         $this->productExports $productExports;
  215.     }
  216.     public function getCountryRoundings(): ?CurrencyCountryRoundingCollection
  217.     {
  218.         return $this->countryRoundings;
  219.     }
  220.     public function setCountryRoundings(CurrencyCountryRoundingCollection $countryRoundings): void
  221.     {
  222.         $this->countryRoundings $countryRoundings;
  223.     }
  224.     public function getItemRounding(): CashRoundingConfig
  225.     {
  226.         return $this->itemRounding;
  227.     }
  228.     public function setItemRounding(CashRoundingConfig $itemRounding): void
  229.     {
  230.         $this->itemRounding $itemRounding;
  231.     }
  232.     public function getTotalRounding(): CashRoundingConfig
  233.     {
  234.         return $this->totalRounding;
  235.     }
  236.     public function setTotalRounding(CashRoundingConfig $totalRounding): void
  237.     {
  238.         $this->totalRounding $totalRounding;
  239.     }
  240.     /**
  241.      * @deprecated tag:v6.5.0 - Use `itemRounding.decimals` or `totalRounding.decimals`
  242.      */
  243.     public function getDecimalPrecision(): int
  244.     {
  245.         Feature::triggerDeprecationOrThrow(
  246.             'v6.5.0.0',
  247.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0''`itemRounding.decimals` or `totalRounding.decimals`')
  248.         );
  249.         return $this->itemRounding->getDecimals();
  250.     }
  251.     public function getTaxFreeFrom(): ?float
  252.     {
  253.         return $this->taxFreeFrom;
  254.     }
  255.     public function setTaxFreeFrom(?float $taxFreeFrom): void
  256.     {
  257.         $this->taxFreeFrom $taxFreeFrom;
  258.     }
  259. }