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

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