vendor/shopware/core/System/Country/CountryEntity.php line 18

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System\Country;
  3. use Shopware\Core\Checkout\Customer\Aggregate\CustomerAddress\CustomerAddressCollection;
  4. use Shopware\Core\Checkout\Order\Aggregate\OrderAddress\OrderAddressCollection;
  5. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  6. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  7. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  8. use Shopware\Core\Framework\DataAbstractionLayer\TaxFreeConfig;
  9. use Shopware\Core\Framework\Feature;
  10. use Shopware\Core\System\Country\Aggregate\CountryState\CountryStateCollection;
  11. use Shopware\Core\System\Country\Aggregate\CountryTranslation\CountryTranslationCollection;
  12. use Shopware\Core\System\Currency\Aggregate\CurrencyCountryRounding\CurrencyCountryRoundingCollection;
  13. use Shopware\Core\System\SalesChannel\SalesChannelCollection;
  14. use Shopware\Core\System\Tax\Aggregate\TaxRule\TaxRuleCollection;
  15. class CountryEntity extends Entity
  16. {
  17.     use EntityIdTrait;
  18.     use EntityCustomFieldsTrait;
  19.     /**
  20.      * @var string|null
  21.      */
  22.     protected $name;
  23.     /**
  24.      * @var string|null
  25.      */
  26.     protected $iso;
  27.     /**
  28.      * @var int
  29.      */
  30.     protected $position;
  31.     /**
  32.      * @var bool
  33.      *
  34.      * @deprecated tag:v6.5.0 - Will be removed, use $customerTax->getEnabled() instead
  35.      */
  36.     protected $taxFree;
  37.     /**
  38.      * @var bool
  39.      */
  40.     protected $active;
  41.     /**
  42.      * @var bool
  43.      */
  44.     protected $shippingAvailable;
  45.     /**
  46.      * @var string|null
  47.      */
  48.     protected $iso3;
  49.     /**
  50.      * @var bool
  51.      */
  52.     protected $displayStateInRegistration;
  53.     /**
  54.      * @var bool
  55.      */
  56.     protected $forceStateInRegistration;
  57.     /**
  58.      * @var bool
  59.      *
  60.      * @deprecated tag:v6.5.0 - Will be removed, use $companyTax->getEnabled() instead
  61.      */
  62.     protected $companyTaxFree;
  63.     /**
  64.      * @var bool
  65.      */
  66.     protected $checkVatIdPattern;
  67.     /**
  68.      * @var string|null
  69.      */
  70.     protected $vatIdPattern;
  71.     /**
  72.      * @var bool|null
  73.      */
  74.     protected $vatIdRequired;
  75.     protected TaxFreeConfig $customerTax;
  76.     protected TaxFreeConfig $companyTax;
  77.     /**
  78.      * @var CountryStateCollection|null
  79.      */
  80.     protected $states;
  81.     /**
  82.      * @var CountryTranslationCollection|null
  83.      */
  84.     protected $translations;
  85.     /**
  86.      * @var OrderAddressCollection|null
  87.      */
  88.     protected $orderAddresses;
  89.     /**
  90.      * @var CustomerAddressCollection|null
  91.      */
  92.     protected $customerAddresses;
  93.     /**
  94.      * @var SalesChannelCollection|null
  95.      */
  96.     protected $salesChannelDefaultAssignments;
  97.     /**
  98.      * @var SalesChannelCollection|null
  99.      */
  100.     protected $salesChannels;
  101.     /**
  102.      * @var TaxRuleCollection|null
  103.      */
  104.     protected $taxRules;
  105.     /**
  106.      * @var CurrencyCountryRoundingCollection|null
  107.      */
  108.     protected $currencyCountryRoundings;
  109.     public function getName(): ?string
  110.     {
  111.         return $this->name;
  112.     }
  113.     public function setName(?string $name): void
  114.     {
  115.         $this->name $name;
  116.     }
  117.     public function getIso(): ?string
  118.     {
  119.         return $this->iso;
  120.     }
  121.     public function setIso(?string $iso): void
  122.     {
  123.         $this->iso $iso;
  124.     }
  125.     public function getPosition(): int
  126.     {
  127.         return $this->position;
  128.     }
  129.     public function setPosition(int $position): void
  130.     {
  131.         $this->position $position;
  132.     }
  133.     /**
  134.      * @deprecated tag:v6.5.0 - Will be removed in version 6.5.0
  135.      */
  136.     public function getTaxFree(): bool
  137.     {
  138.         Feature::triggerDeprecationOrThrow(
  139.             'v6.5.0.0',
  140.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0''CountryEntity->getCustomerTax->getEnabled()')
  141.         );
  142.         return $this->taxFree;
  143.     }
  144.     /**
  145.      * @deprecated tag:v6.5.0 - Will be removed in version 6.5.0
  146.      */
  147.     public function setTaxFree(bool $taxFree): void
  148.     {
  149.         Feature::triggerDeprecationOrThrow(
  150.             'v6.5.0.0',
  151.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0''CountryEntity->getCustomerTax->setEnabled()')
  152.         );
  153.         $this->taxFree $taxFree;
  154.     }
  155.     public function getActive(): bool
  156.     {
  157.         return $this->active;
  158.     }
  159.     public function setActive(bool $active): void
  160.     {
  161.         $this->active $active;
  162.     }
  163.     public function getShippingAvailable(): bool
  164.     {
  165.         return $this->shippingAvailable;
  166.     }
  167.     public function setShippingAvailable(bool $shippingAvailable): void
  168.     {
  169.         $this->shippingAvailable $shippingAvailable;
  170.     }
  171.     public function getIso3(): ?string
  172.     {
  173.         return $this->iso3;
  174.     }
  175.     public function setIso3(?string $iso3): void
  176.     {
  177.         $this->iso3 $iso3;
  178.     }
  179.     public function getDisplayStateInRegistration(): bool
  180.     {
  181.         return $this->displayStateInRegistration;
  182.     }
  183.     public function setDisplayStateInRegistration(bool $displayStateInRegistration): void
  184.     {
  185.         $this->displayStateInRegistration $displayStateInRegistration;
  186.     }
  187.     public function getForceStateInRegistration(): bool
  188.     {
  189.         return $this->forceStateInRegistration;
  190.     }
  191.     public function setForceStateInRegistration(bool $forceStateInRegistration): void
  192.     {
  193.         $this->forceStateInRegistration $forceStateInRegistration;
  194.     }
  195.     /**
  196.      * @deprecated tag:v6.5.0 - Will be removed in version 6.5.0
  197.      */
  198.     public function getCompanyTaxFree(): bool
  199.     {
  200.         Feature::triggerDeprecationOrThrow(
  201.             'v6.5.0.0',
  202.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0''CountryEntity->getCompanyTax->getEnabled()')
  203.         );
  204.         return $this->companyTaxFree;
  205.     }
  206.     /**
  207.      * @deprecated tag:v6.5.0 - Will be removed in version 6.5.0
  208.      */
  209.     public function setCompanyTaxFree(bool $companyTaxFree): void
  210.     {
  211.         Feature::triggerDeprecationOrThrow(
  212.             'v6.5.0.0',
  213.             Feature::deprecatedMethodMessage(__CLASS____METHOD__'v6.5.0.0''CountryEntity->getCompanyTax->setEnabled()')
  214.         );
  215.         $this->companyTaxFree $companyTaxFree;
  216.     }
  217.     public function getCheckVatIdPattern(): bool
  218.     {
  219.         return $this->checkVatIdPattern;
  220.     }
  221.     public function setCheckVatIdPattern(bool $checkVatIdPattern): void
  222.     {
  223.         $this->checkVatIdPattern $checkVatIdPattern;
  224.     }
  225.     public function getVatIdPattern(): ?string
  226.     {
  227.         return $this->vatIdPattern;
  228.     }
  229.     public function setVatIdPattern(?string $vatIdPattern): void
  230.     {
  231.         $this->vatIdPattern $vatIdPattern;
  232.     }
  233.     public function getStates(): ?CountryStateCollection
  234.     {
  235.         return $this->states;
  236.     }
  237.     public function setStates(CountryStateCollection $states): void
  238.     {
  239.         $this->states $states;
  240.     }
  241.     public function getTranslations(): ?CountryTranslationCollection
  242.     {
  243.         return $this->translations;
  244.     }
  245.     public function setTranslations(CountryTranslationCollection $translations): void
  246.     {
  247.         $this->translations $translations;
  248.     }
  249.     public function getOrderAddresses(): ?OrderAddressCollection
  250.     {
  251.         return $this->orderAddresses;
  252.     }
  253.     public function setOrderAddresses(OrderAddressCollection $orderAddresses): void
  254.     {
  255.         $this->orderAddresses $orderAddresses;
  256.     }
  257.     public function getCustomerAddresses(): ?CustomerAddressCollection
  258.     {
  259.         return $this->customerAddresses;
  260.     }
  261.     public function setCustomerAddresses(CustomerAddressCollection $customerAddresses): void
  262.     {
  263.         $this->customerAddresses $customerAddresses;
  264.     }
  265.     public function getSalesChannelDefaultAssignments(): ?SalesChannelCollection
  266.     {
  267.         return $this->salesChannelDefaultAssignments;
  268.     }
  269.     public function setSalesChannelDefaultAssignments(SalesChannelCollection $salesChannelDefaultAssignments): void
  270.     {
  271.         $this->salesChannelDefaultAssignments $salesChannelDefaultAssignments;
  272.     }
  273.     public function getSalesChannels(): ?SalesChannelCollection
  274.     {
  275.         return $this->salesChannels;
  276.     }
  277.     public function setSalesChannels(SalesChannelCollection $salesChannels): void
  278.     {
  279.         $this->salesChannels $salesChannels;
  280.     }
  281.     public function getTaxRules(): ?TaxRuleCollection
  282.     {
  283.         return $this->taxRules;
  284.     }
  285.     public function setTaxRules(TaxRuleCollection $taxRules): void
  286.     {
  287.         $this->taxRules $taxRules;
  288.     }
  289.     public function getCurrencyCountryRoundings(): ?CurrencyCountryRoundingCollection
  290.     {
  291.         return $this->currencyCountryRoundings;
  292.     }
  293.     public function setCurrencyCountryRoundings(CurrencyCountryRoundingCollection $currencyCountryRoundings): void
  294.     {
  295.         $this->currencyCountryRoundings $currencyCountryRoundings;
  296.     }
  297.     public function getVatIdRequired(): bool
  298.     {
  299.         return (bool) $this->vatIdRequired;
  300.     }
  301.     public function setVatIdRequired(bool $vatIdRequired): void
  302.     {
  303.         $this->vatIdRequired $vatIdRequired;
  304.     }
  305.     public function getCustomerTax(): TaxFreeConfig
  306.     {
  307.         return $this->customerTax;
  308.     }
  309.     public function setCustomerTax(TaxFreeConfig $customerTax): void
  310.     {
  311.         $this->customerTax $customerTax;
  312.     }
  313.     public function getCompanyTax(): TaxFreeConfig
  314.     {
  315.         return $this->companyTax;
  316.     }
  317.     public function setCompanyTax(TaxFreeConfig $companyTax): void
  318.     {
  319.         $this->companyTax $companyTax;
  320.     }
  321. }