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::triggerDeprecated('FEATURE_NEXT_14114''6.4.0''6.5.0''Will be removed in version 6.5.0, use $customerTax->getEnabled() instead.');
  139.         return $this->taxFree;
  140.     }
  141.     /**
  142.      * @deprecated tag:v6.5.0 - Will be removed in version 6.5.0
  143.      */
  144.     public function setTaxFree(bool $taxFree): void
  145.     {
  146.         Feature::triggerDeprecated('FEATURE_NEXT_14114''6.4.0''6.5.0''Will be removed in version 6.5.0.');
  147.         $this->taxFree $taxFree;
  148.     }
  149.     public function getActive(): bool
  150.     {
  151.         return $this->active;
  152.     }
  153.     public function setActive(bool $active): void
  154.     {
  155.         $this->active $active;
  156.     }
  157.     public function getShippingAvailable(): bool
  158.     {
  159.         return $this->shippingAvailable;
  160.     }
  161.     public function setShippingAvailable(bool $shippingAvailable): void
  162.     {
  163.         $this->shippingAvailable $shippingAvailable;
  164.     }
  165.     public function getIso3(): ?string
  166.     {
  167.         return $this->iso3;
  168.     }
  169.     public function setIso3(?string $iso3): void
  170.     {
  171.         $this->iso3 $iso3;
  172.     }
  173.     public function getDisplayStateInRegistration(): bool
  174.     {
  175.         return $this->displayStateInRegistration;
  176.     }
  177.     public function setDisplayStateInRegistration(bool $displayStateInRegistration): void
  178.     {
  179.         $this->displayStateInRegistration $displayStateInRegistration;
  180.     }
  181.     public function getForceStateInRegistration(): bool
  182.     {
  183.         return $this->forceStateInRegistration;
  184.     }
  185.     public function setForceStateInRegistration(bool $forceStateInRegistration): void
  186.     {
  187.         $this->forceStateInRegistration $forceStateInRegistration;
  188.     }
  189.     /**
  190.      * @deprecated tag:v6.5.0 - Will be removed in version 6.5.0
  191.      */
  192.     public function getCompanyTaxFree(): bool
  193.     {
  194.         Feature::triggerDeprecated('FEATURE_NEXT_14114''6.4.0''6.5.0''Will be removed in version 6.5.0, use $companyTax->getEnabled() instead.');
  195.         return $this->companyTaxFree;
  196.     }
  197.     /**
  198.      * @deprecated tag:v6.5.0 - Will be removed in version 6.5.0
  199.      */
  200.     public function setCompanyTaxFree(bool $companyTaxFree): void
  201.     {
  202.         Feature::triggerDeprecated('FEATURE_NEXT_14114''6.4.0''6.5.0''Will be removed in version 6.5.0.');
  203.         $this->companyTaxFree $companyTaxFree;
  204.     }
  205.     public function getCheckVatIdPattern(): bool
  206.     {
  207.         return $this->checkVatIdPattern;
  208.     }
  209.     public function setCheckVatIdPattern(bool $checkVatIdPattern): void
  210.     {
  211.         $this->checkVatIdPattern $checkVatIdPattern;
  212.     }
  213.     public function getVatIdPattern(): ?string
  214.     {
  215.         return $this->vatIdPattern;
  216.     }
  217.     public function setVatIdPattern(?string $vatIdPattern): void
  218.     {
  219.         $this->vatIdPattern $vatIdPattern;
  220.     }
  221.     public function getStates(): ?CountryStateCollection
  222.     {
  223.         return $this->states;
  224.     }
  225.     public function setStates(CountryStateCollection $states): void
  226.     {
  227.         $this->states $states;
  228.     }
  229.     public function getTranslations(): ?CountryTranslationCollection
  230.     {
  231.         return $this->translations;
  232.     }
  233.     public function setTranslations(CountryTranslationCollection $translations): void
  234.     {
  235.         $this->translations $translations;
  236.     }
  237.     public function getOrderAddresses(): ?OrderAddressCollection
  238.     {
  239.         return $this->orderAddresses;
  240.     }
  241.     public function setOrderAddresses(OrderAddressCollection $orderAddresses): void
  242.     {
  243.         $this->orderAddresses $orderAddresses;
  244.     }
  245.     public function getCustomerAddresses(): ?CustomerAddressCollection
  246.     {
  247.         return $this->customerAddresses;
  248.     }
  249.     public function setCustomerAddresses(CustomerAddressCollection $customerAddresses): void
  250.     {
  251.         $this->customerAddresses $customerAddresses;
  252.     }
  253.     public function getSalesChannelDefaultAssignments(): ?SalesChannelCollection
  254.     {
  255.         return $this->salesChannelDefaultAssignments;
  256.     }
  257.     public function setSalesChannelDefaultAssignments(SalesChannelCollection $salesChannelDefaultAssignments): void
  258.     {
  259.         $this->salesChannelDefaultAssignments $salesChannelDefaultAssignments;
  260.     }
  261.     public function getSalesChannels(): ?SalesChannelCollection
  262.     {
  263.         return $this->salesChannels;
  264.     }
  265.     public function setSalesChannels(SalesChannelCollection $salesChannels): void
  266.     {
  267.         $this->salesChannels $salesChannels;
  268.     }
  269.     public function getTaxRules(): ?TaxRuleCollection
  270.     {
  271.         return $this->taxRules;
  272.     }
  273.     public function setTaxRules(TaxRuleCollection $taxRules): void
  274.     {
  275.         $this->taxRules $taxRules;
  276.     }
  277.     public function getCurrencyCountryRoundings(): ?CurrencyCountryRoundingCollection
  278.     {
  279.         return $this->currencyCountryRoundings;
  280.     }
  281.     public function setCurrencyCountryRoundings(CurrencyCountryRoundingCollection $currencyCountryRoundings): void
  282.     {
  283.         $this->currencyCountryRoundings $currencyCountryRoundings;
  284.     }
  285.     public function getVatIdRequired(): bool
  286.     {
  287.         return (bool) $this->vatIdRequired;
  288.     }
  289.     public function setVatIdRequired(bool $vatIdRequired): void
  290.     {
  291.         $this->vatIdRequired $vatIdRequired;
  292.     }
  293.     public function getCustomerTax(): TaxFreeConfig
  294.     {
  295.         return $this->customerTax;
  296.     }
  297.     public function setCustomerTax(TaxFreeConfig $customerTax): void
  298.     {
  299.         $this->customerTax $customerTax;
  300.     }
  301.     public function getCompanyTax(): TaxFreeConfig
  302.     {
  303.         return $this->companyTax;
  304.     }
  305.     public function setCompanyTax(TaxFreeConfig $companyTax): void
  306.     {
  307.         $this->companyTax $companyTax;
  308.     }
  309. }