vendor/shopware/core/Content/Product/Aggregate/ProductCrossSelling/ProductCrossSellingEntity.php line 15

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product\Aggregate\ProductCrossSelling;
  3. use Shopware\Core\Content\Product\Aggregate\ProductCrossSellingAssignedProducts\ProductCrossSellingAssignedProductsCollection;
  4. use Shopware\Core\Content\Product\Aggregate\ProductCrossSellingTranslation\ProductCrossSellingTranslationCollection;
  5. use Shopware\Core\Content\Product\ProductEntity;
  6. use Shopware\Core\Content\ProductStream\ProductStreamEntity;
  7. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  8. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  9. use Shopware\Core\Framework\DataAbstractionLayer\Search\Sorting\FieldSorting;
  10. use Shopware\Core\Framework\Log\Package;
  11. #[Package('inventory')]
  12. class ProductCrossSellingEntity extends Entity
  13. {
  14.     use EntityIdTrait;
  15.     /**
  16.      * @var string|null
  17.      */
  18.     protected $name;
  19.     /**
  20.      * @var int
  21.      */
  22.     protected $position;
  23.     /**
  24.      * @var string
  25.      */
  26.     protected $sortBy;
  27.     /**
  28.      * @var string
  29.      */
  30.     protected $sortDirection;
  31.     /**
  32.      * @var int
  33.      */
  34.     protected $limit;
  35.     /**
  36.      * @var bool
  37.      */
  38.     protected $active;
  39.     /**
  40.      * @var string
  41.      */
  42.     protected $productId;
  43.     /**
  44.      * @var ProductEntity|null
  45.      */
  46.     protected $product;
  47.     /**
  48.      * @var string
  49.      */
  50.     protected $productStreamId;
  51.     /**
  52.      * @var ProductStreamEntity|null
  53.      */
  54.     protected $productStream;
  55.     /**
  56.      * @var string
  57.      */
  58.     protected $type;
  59.     /**
  60.      * @var ProductCrossSellingAssignedProductsCollection|null
  61.      */
  62.     protected $assignedProducts;
  63.     /**
  64.      * @var ProductCrossSellingTranslationCollection|null
  65.      */
  66.     protected $translations;
  67.     public function getName(): ?string
  68.     {
  69.         return $this->name;
  70.     }
  71.     public function setName(?string $name): void
  72.     {
  73.         $this->name $name;
  74.     }
  75.     public function getPosition(): int
  76.     {
  77.         return $this->position;
  78.     }
  79.     public function setPosition(int $position): void
  80.     {
  81.         $this->position $position;
  82.     }
  83.     public function getSortBy(): string
  84.     {
  85.         return $this->sortBy;
  86.     }
  87.     public function setSortBy(string $sortBy): void
  88.     {
  89.         $this->sortBy $sortBy;
  90.     }
  91.     public function getSortDirection(): string
  92.     {
  93.         return $this->sortDirection;
  94.     }
  95.     public function setSortDirection(string $sortDirection): void
  96.     {
  97.         $this->sortDirection $sortDirection;
  98.     }
  99.     public function isActive(): bool
  100.     {
  101.         return $this->active;
  102.     }
  103.     public function setActive(bool $active): void
  104.     {
  105.         $this->active $active;
  106.     }
  107.     public function getLimit(): int
  108.     {
  109.         return $this->limit;
  110.     }
  111.     public function setLimit(int $limit): void
  112.     {
  113.         $this->limit $limit;
  114.     }
  115.     public function getProductId(): string
  116.     {
  117.         return $this->productId;
  118.     }
  119.     public function setProductId(string $productId): void
  120.     {
  121.         $this->productId $productId;
  122.     }
  123.     public function getProduct(): ?ProductEntity
  124.     {
  125.         return $this->product;
  126.     }
  127.     public function setProduct(ProductEntity $product): void
  128.     {
  129.         $this->product $product;
  130.     }
  131.     public function getProductStreamId(): ?string
  132.     {
  133.         return $this->productStreamId;
  134.     }
  135.     public function setProductStreamId(string $productStreamId): void
  136.     {
  137.         $this->productStreamId $productStreamId;
  138.     }
  139.     public function getProductStream(): ?ProductStreamEntity
  140.     {
  141.         return $this->productStream;
  142.     }
  143.     public function setProductStream(ProductStreamEntity $productStream): void
  144.     {
  145.         $this->productStream $productStream;
  146.     }
  147.     public function getTranslations(): ?ProductCrossSellingTranslationCollection
  148.     {
  149.         return $this->translations;
  150.     }
  151.     public function setTranslations(ProductCrossSellingTranslationCollection $translations): void
  152.     {
  153.         $this->translations $translations;
  154.     }
  155.     public function getSorting(): FieldSorting
  156.     {
  157.         return new FieldSorting($this->sortBy$this->sortDirection);
  158.     }
  159.     public function getType(): string
  160.     {
  161.         return $this->type;
  162.     }
  163.     public function setType(string $type): void
  164.     {
  165.         $this->type $type;
  166.     }
  167.     public function getAssignedProducts(): ?ProductCrossSellingAssignedProductsCollection
  168.     {
  169.         return $this->assignedProducts;
  170.     }
  171.     public function setAssignedProducts(ProductCrossSellingAssignedProductsCollection $assignedProducts): void
  172.     {
  173.         $this->assignedProducts $assignedProducts;
  174.     }
  175. }