vendor/shopware/core/Checkout/Shipping/ShippingMethodEntity.php line 18

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Checkout\Shipping;
  3. use Shopware\Core\Checkout\Order\Aggregate\OrderDelivery\OrderDeliveryCollection;
  4. use Shopware\Core\Checkout\Shipping\Aggregate\ShippingMethodPrice\ShippingMethodPriceCollection;
  5. use Shopware\Core\Checkout\Shipping\Aggregate\ShippingMethodTranslation\ShippingMethodTranslationCollection;
  6. use Shopware\Core\Content\Media\MediaEntity;
  7. use Shopware\Core\Content\Rule\RuleEntity;
  8. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  9. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  10. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  11. use Shopware\Core\System\DeliveryTime\DeliveryTimeEntity;
  12. use Shopware\Core\System\SalesChannel\SalesChannelCollection;
  13. use Shopware\Core\System\Tag\TagCollection;
  14. use Shopware\Core\System\Tax\TaxEntity;
  15. class ShippingMethodEntity extends Entity
  16. {
  17.     use EntityIdTrait;
  18.     use EntityCustomFieldsTrait;
  19.     public const TAX_TYPE_AUTO 'auto';
  20.     public const TAX_TYPE_FIXED 'fixed';
  21.     public const TAX_TYPE_HIGHEST 'highest';
  22.     /**
  23.      * @var string|null
  24.      */
  25.     protected $name;
  26.     /**
  27.      * @var bool
  28.      */
  29.     protected $active;
  30.     /**
  31.      * @var string|null
  32.      */
  33.     protected $description;
  34.     /**
  35.      * @var string|null
  36.      */
  37.     protected $trackingUrl;
  38.     /**
  39.      * @var string
  40.      */
  41.     protected $deliveryTimeId;
  42.     /**
  43.      * @var DeliveryTimeEntity|null
  44.      */
  45.     protected $deliveryTime;
  46.     /**
  47.      * @var ShippingMethodTranslationCollection|null
  48.      */
  49.     protected $translations;
  50.     /**
  51.      * @var OrderDeliveryCollection|null
  52.      */
  53.     protected $orderDeliveries;
  54.     /**
  55.      * @var SalesChannelCollection|null
  56.      */
  57.     protected $salesChannelDefaultAssignments;
  58.     /**
  59.      * @var SalesChannelCollection|null
  60.      */
  61.     protected $salesChannels;
  62.     /**
  63.      * @var RuleEntity|null
  64.      */
  65.     protected $availabilityRule;
  66.     /**
  67.      * @var string
  68.      */
  69.     protected $availabilityRuleId;
  70.     /**
  71.      * @var ShippingMethodPriceCollection
  72.      */
  73.     protected $prices;
  74.     /**
  75.      * @var string|null
  76.      */
  77.     protected $mediaId;
  78.     /**
  79.      * @var string|null
  80.      */
  81.     protected $taxId;
  82.     /**
  83.      * @var MediaEntity|null
  84.      */
  85.     protected $media;
  86.     /**
  87.      * @var TagCollection|null
  88.      */
  89.     protected $tags;
  90.     /**
  91.      * @var string
  92.      */
  93.     protected $taxType;
  94.     /**
  95.      * @var TaxEntity|null
  96.      */
  97.     protected $tax;
  98.     public function __construct()
  99.     {
  100.         $this->prices = new ShippingMethodPriceCollection();
  101.     }
  102.     public function getName(): ?string
  103.     {
  104.         return $this->name;
  105.     }
  106.     public function setName(?string $name): void
  107.     {
  108.         $this->name $name;
  109.     }
  110.     public function getActive(): bool
  111.     {
  112.         return $this->active;
  113.     }
  114.     public function setActive(bool $active): void
  115.     {
  116.         $this->active $active;
  117.     }
  118.     public function getDescription(): ?string
  119.     {
  120.         return $this->description;
  121.     }
  122.     public function setDescription(?string $description): void
  123.     {
  124.         $this->description $description;
  125.     }
  126.     public function getTrackingUrl(): ?string
  127.     {
  128.         return $this->trackingUrl;
  129.     }
  130.     public function setTrackingUrl(?string $trackingUrl): void
  131.     {
  132.         $this->trackingUrl $trackingUrl;
  133.     }
  134.     public function getDeliveryTimeId(): string
  135.     {
  136.         return $this->deliveryTimeId;
  137.     }
  138.     public function setDeliveryTimeId(string $deliveryTimeId): void
  139.     {
  140.         $this->deliveryTimeId $deliveryTimeId;
  141.     }
  142.     public function getDeliveryTime(): ?DeliveryTimeEntity
  143.     {
  144.         return $this->deliveryTime;
  145.     }
  146.     public function setDeliveryTime(DeliveryTimeEntity $deliveryTime): void
  147.     {
  148.         $this->deliveryTime $deliveryTime;
  149.     }
  150.     public function getTranslations(): ?ShippingMethodTranslationCollection
  151.     {
  152.         return $this->translations;
  153.     }
  154.     public function setTranslations(ShippingMethodTranslationCollection $translations): void
  155.     {
  156.         $this->translations $translations;
  157.     }
  158.     public function getOrderDeliveries(): ?OrderDeliveryCollection
  159.     {
  160.         return $this->orderDeliveries;
  161.     }
  162.     public function setOrderDeliveries(OrderDeliveryCollection $orderDeliveries): void
  163.     {
  164.         $this->orderDeliveries $orderDeliveries;
  165.     }
  166.     public function getSalesChannelDefaultAssignments(): ?SalesChannelCollection
  167.     {
  168.         return $this->salesChannelDefaultAssignments;
  169.     }
  170.     public function setSalesChannelDefaultAssignments(SalesChannelCollection $salesChannelDefaultAssignments): void
  171.     {
  172.         $this->salesChannelDefaultAssignments $salesChannelDefaultAssignments;
  173.     }
  174.     public function getSalesChannels(): ?SalesChannelCollection
  175.     {
  176.         return $this->salesChannels;
  177.     }
  178.     public function setSalesChannels(SalesChannelCollection $salesChannels): void
  179.     {
  180.         $this->salesChannels $salesChannels;
  181.     }
  182.     public function getPrices(): ShippingMethodPriceCollection
  183.     {
  184.         return $this->prices;
  185.     }
  186.     public function setPrices(ShippingMethodPriceCollection $prices): void
  187.     {
  188.         $this->prices $prices;
  189.     }
  190.     public function getAvailabilityRule(): ?RuleEntity
  191.     {
  192.         return $this->availabilityRule;
  193.     }
  194.     public function setAvailabilityRule(?RuleEntity $availabilityRule): void
  195.     {
  196.         $this->availabilityRule $availabilityRule;
  197.     }
  198.     public function getAvailabilityRuleId(): string
  199.     {
  200.         return $this->availabilityRuleId;
  201.     }
  202.     public function setAvailabilityRuleId(string $availabilityRuleId): void
  203.     {
  204.         $this->availabilityRuleId $availabilityRuleId;
  205.     }
  206.     public function getMediaId(): ?string
  207.     {
  208.         return $this->mediaId;
  209.     }
  210.     public function setMediaId(string $mediaId): void
  211.     {
  212.         $this->mediaId $mediaId;
  213.     }
  214.     public function getTaxId(): ?string
  215.     {
  216.         return $this->taxId;
  217.     }
  218.     public function setTaxId(?string $taxId): void
  219.     {
  220.         $this->taxId $taxId;
  221.     }
  222.     public function getMedia(): ?MediaEntity
  223.     {
  224.         return $this->media;
  225.     }
  226.     public function setMedia(MediaEntity $media): void
  227.     {
  228.         $this->media $media;
  229.     }
  230.     public function getTags(): ?TagCollection
  231.     {
  232.         return $this->tags;
  233.     }
  234.     public function setTags(TagCollection $tags): void
  235.     {
  236.         $this->tags $tags;
  237.     }
  238.     public function getTaxType(): string
  239.     {
  240.         return $this->taxType;
  241.     }
  242.     public function setTaxType(string $taxType): void
  243.     {
  244.         $this->taxType $taxType;
  245.     }
  246.     public function getTax(): ?TaxEntity
  247.     {
  248.         return $this->tax;
  249.     }
  250.     public function setTax(TaxEntity $tax): void
  251.     {
  252.         $this->tax $tax;
  253.     }
  254. }