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

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\EntityIdTrait;
  10. use Shopware\Core\System\DeliveryTime\DeliveryTimeEntity;
  11. use Shopware\Core\System\SalesChannel\SalesChannelCollection;
  12. use Shopware\Core\System\Tag\TagCollection;
  13. class ShippingMethodEntity extends Entity
  14. {
  15.     use EntityIdTrait;
  16.     /**
  17.      * @var string|null
  18.      */
  19.     protected $name;
  20.     /**
  21.      * @var bool
  22.      */
  23.     protected $active;
  24.     /**
  25.      * @var string|null
  26.      */
  27.     protected $description;
  28.     /**
  29.      * @var string|null
  30.      */
  31.     protected $trackingUrl;
  32.     /**
  33.      * @var string
  34.      */
  35.     protected $deliveryTimeId;
  36.     /**
  37.      * @var DeliveryTimeEntity|null
  38.      */
  39.     protected $deliveryTime;
  40.     /**
  41.      * @var ShippingMethodTranslationCollection|null
  42.      */
  43.     protected $translations;
  44.     /**
  45.      * @var OrderDeliveryCollection|null
  46.      */
  47.     protected $orderDeliveries;
  48.     /**
  49.      * @var SalesChannelCollection|null
  50.      */
  51.     protected $salesChannelDefaultAssignments;
  52.     /**
  53.      * @var SalesChannelCollection|null
  54.      */
  55.     protected $salesChannels;
  56.     /**
  57.      * @var array|null
  58.      */
  59.     protected $customFields;
  60.     /**
  61.      * @var RuleEntity|null
  62.      */
  63.     protected $availabilityRule;
  64.     /**
  65.      * @var string
  66.      */
  67.     protected $availabilityRuleId;
  68.     /**
  69.      * @var ShippingMethodPriceCollection
  70.      */
  71.     protected $prices;
  72.     /**
  73.      * @var string|null
  74.      */
  75.     protected $mediaId;
  76.     /**
  77.      * @var MediaEntity|null
  78.      */
  79.     protected $media;
  80.     /**
  81.      * @var TagCollection|null
  82.      */
  83.     protected $tags;
  84.     public function __construct()
  85.     {
  86.         $this->prices = new ShippingMethodPriceCollection();
  87.     }
  88.     public function getName(): ?string
  89.     {
  90.         return $this->name;
  91.     }
  92.     public function setName(?string $name): void
  93.     {
  94.         $this->name $name;
  95.     }
  96.     public function getActive(): bool
  97.     {
  98.         return $this->active;
  99.     }
  100.     public function setActive(bool $active): void
  101.     {
  102.         $this->active $active;
  103.     }
  104.     public function getDescription(): ?string
  105.     {
  106.         return $this->description;
  107.     }
  108.     public function setDescription(?string $description): void
  109.     {
  110.         $this->description $description;
  111.     }
  112.     public function getTrackingUrl(): ?string
  113.     {
  114.         return $this->trackingUrl;
  115.     }
  116.     public function setTrackingUrl(?string $trackingUrl): void
  117.     {
  118.         $this->trackingUrl $trackingUrl;
  119.     }
  120.     public function getDeliveryTimeId(): string
  121.     {
  122.         return $this->deliveryTimeId;
  123.     }
  124.     public function setDeliveryTimeId(string $deliveryTimeId): void
  125.     {
  126.         $this->deliveryTimeId $deliveryTimeId;
  127.     }
  128.     public function getDeliveryTime(): ?DeliveryTimeEntity
  129.     {
  130.         return $this->deliveryTime;
  131.     }
  132.     public function setDeliveryTime(DeliveryTimeEntity $deliveryTime): void
  133.     {
  134.         $this->deliveryTime $deliveryTime;
  135.     }
  136.     public function getTranslations(): ?ShippingMethodTranslationCollection
  137.     {
  138.         return $this->translations;
  139.     }
  140.     public function setTranslations(ShippingMethodTranslationCollection $translations): void
  141.     {
  142.         $this->translations $translations;
  143.     }
  144.     public function getOrderDeliveries(): ?OrderDeliveryCollection
  145.     {
  146.         return $this->orderDeliveries;
  147.     }
  148.     public function setOrderDeliveries(OrderDeliveryCollection $orderDeliveries): void
  149.     {
  150.         $this->orderDeliveries $orderDeliveries;
  151.     }
  152.     public function getSalesChannelDefaultAssignments(): ?SalesChannelCollection
  153.     {
  154.         return $this->salesChannelDefaultAssignments;
  155.     }
  156.     public function setSalesChannelDefaultAssignments(SalesChannelCollection $salesChannelDefaultAssignments): void
  157.     {
  158.         $this->salesChannelDefaultAssignments $salesChannelDefaultAssignments;
  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 getCustomFields(): ?array
  169.     {
  170.         return $this->customFields;
  171.     }
  172.     public function setCustomFields(?array $customFields): void
  173.     {
  174.         $this->customFields $customFields;
  175.     }
  176.     public function getPrices(): ShippingMethodPriceCollection
  177.     {
  178.         return $this->prices;
  179.     }
  180.     public function setPrices(ShippingMethodPriceCollection $prices): void
  181.     {
  182.         $this->prices $prices;
  183.     }
  184.     public function getAvailabilityRule(): ?RuleEntity
  185.     {
  186.         return $this->availabilityRule;
  187.     }
  188.     public function setAvailabilityRule(?RuleEntity $availabilityRule): void
  189.     {
  190.         $this->availabilityRule $availabilityRule;
  191.     }
  192.     public function getAvailabilityRuleId(): string
  193.     {
  194.         return $this->availabilityRuleId;
  195.     }
  196.     public function setAvailabilityRuleId(string $availabilityRuleId): void
  197.     {
  198.         $this->availabilityRuleId $availabilityRuleId;
  199.     }
  200.     public function getMediaId(): ?string
  201.     {
  202.         return $this->mediaId;
  203.     }
  204.     public function setMediaId(string $mediaId): void
  205.     {
  206.         $this->mediaId $mediaId;
  207.     }
  208.     public function getMedia(): ?MediaEntity
  209.     {
  210.         return $this->media;
  211.     }
  212.     public function setMedia(MediaEntity $media): void
  213.     {
  214.         $this->media $media;
  215.     }
  216.     public function getTags(): ?TagCollection
  217.     {
  218.         return $this->tags;
  219.     }
  220.     public function setTags(TagCollection $tags): void
  221.     {
  222.         $this->tags $tags;
  223.     }
  224.     public function getApiAlias(): string
  225.     {
  226.         return 'shipping_method';
  227.     }
  228. }