vendor/shopware/core/System/DeliveryTime/DeliveryTimeEntity.php line 13

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System\DeliveryTime;
  3. use Shopware\Core\Checkout\Shipping\ShippingMethodCollection;
  4. use Shopware\Core\Content\Product\ProductCollection;
  5. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  6. use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection;
  7. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  8. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  9. use Shopware\Core\System\DeliveryTime\Aggregate\DeliveryTimeTranslation\DeliveryTimeTranslationCollection;
  10. class DeliveryTimeEntity extends Entity
  11. {
  12.     use EntityIdTrait;
  13.     use EntityCustomFieldsTrait;
  14.     public const DELIVERY_TIME_HOUR 'hour';
  15.     public const DELIVERY_TIME_DAY 'day';
  16.     public const DELIVERY_TIME_WEEK 'week';
  17.     public const DELIVERY_TIME_MONTH 'month';
  18.     public const DELIVERY_TIME_YEAR 'year';
  19.     /**
  20.      * @var string|null
  21.      */
  22.     protected $name;
  23.     /**
  24.      * @var int
  25.      */
  26.     protected $min;
  27.     /**
  28.      * @var int
  29.      */
  30.     protected $max;
  31.     /**
  32.      * @var string
  33.      */
  34.     protected $unit;
  35.     /**
  36.      * @var ShippingMethodCollection|null
  37.      */
  38.     protected $shippingMethods;
  39.     /**
  40.      * @var DeliveryTimeTranslationCollection|null
  41.      */
  42.     protected $translations;
  43.     /**
  44.      * @var ProductCollection|null
  45.      */
  46.     protected $products;
  47.     public function getName(): ?string
  48.     {
  49.         return $this->name;
  50.     }
  51.     public function setName(string $name): void
  52.     {
  53.         $this->name $name;
  54.     }
  55.     public function getMin(): int
  56.     {
  57.         return $this->min;
  58.     }
  59.     public function setMin(int $min): void
  60.     {
  61.         $this->min $min;
  62.     }
  63.     public function getMax(): int
  64.     {
  65.         return $this->max;
  66.     }
  67.     public function setMax(int $max): void
  68.     {
  69.         $this->max $max;
  70.     }
  71.     public function getUnit(): string
  72.     {
  73.         return $this->unit;
  74.     }
  75.     public function setUnit(string $unit): void
  76.     {
  77.         $this->unit $unit;
  78.     }
  79.     public function getShippingMethods(): ?ShippingMethodCollection
  80.     {
  81.         return $this->shippingMethods;
  82.     }
  83.     public function setShippingMethods(ShippingMethodCollection $shippingMethods): void
  84.     {
  85.         $this->shippingMethods $shippingMethods;
  86.     }
  87.     /**
  88.      * @return DeliveryTimeTranslationCollection|null
  89.      */
  90.     public function getTranslations(): ?EntityCollection
  91.     {
  92.         return $this->translations;
  93.     }
  94.     /**
  95.      * @param DeliveryTimeTranslationCollection $translations
  96.      */
  97.     public function setTranslations(EntityCollection $translations): void
  98.     {
  99.         $this->translations $translations;
  100.     }
  101.     public function getProducts(): ?ProductCollection
  102.     {
  103.         return $this->products;
  104.     }
  105.     public function setProducts(ProductCollection $products): void
  106.     {
  107.         $this->products $products;
  108.     }
  109. }