vendor/shopware/core/Content/Product/Aggregate/ProductMedia/ProductMediaEntity.php line 12

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Content\Product\Aggregate\ProductMedia;
  3. use Shopware\Core\Content\Media\MediaEntity;
  4. use Shopware\Core\Content\Product\ProductCollection;
  5. use Shopware\Core\Content\Product\ProductEntity;
  6. use Shopware\Core\Framework\DataAbstractionLayer\Entity;
  7. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  8. use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
  9. class ProductMediaEntity extends Entity
  10. {
  11.     use EntityIdTrait;
  12.     use EntityCustomFieldsTrait;
  13.     /**
  14.      * @var string
  15.      */
  16.     protected $productId;
  17.     /**
  18.      * @var string
  19.      */
  20.     protected $mediaId;
  21.     /**
  22.      * @var int
  23.      */
  24.     protected $position;
  25.     /**
  26.      * @var MediaEntity|null
  27.      */
  28.     protected $media;
  29.     /**
  30.      * @var ProductEntity|null
  31.      */
  32.     protected $product;
  33.     /**
  34.      * @var ProductCollection|null
  35.      */
  36.     protected $coverProducts;
  37.     public function getProductId(): string
  38.     {
  39.         return $this->productId;
  40.     }
  41.     public function setProductId(string $productId): void
  42.     {
  43.         $this->productId $productId;
  44.     }
  45.     public function getMediaId(): string
  46.     {
  47.         return $this->mediaId;
  48.     }
  49.     public function setMediaId(string $mediaId): void
  50.     {
  51.         $this->mediaId $mediaId;
  52.     }
  53.     public function getPosition(): int
  54.     {
  55.         return $this->position;
  56.     }
  57.     public function setPosition(int $position): void
  58.     {
  59.         $this->position $position;
  60.     }
  61.     public function getMedia(): ?MediaEntity
  62.     {
  63.         return $this->media;
  64.     }
  65.     public function setMedia(MediaEntity $media): void
  66.     {
  67.         $this->media $media;
  68.     }
  69.     public function getProduct(): ?ProductEntity
  70.     {
  71.         return $this->product;
  72.     }
  73.     public function setProduct(ProductEntity $product): void
  74.     {
  75.         $this->product $product;
  76.     }
  77.     public function getCoverProducts(): ?ProductCollection
  78.     {
  79.         return $this->coverProducts;
  80.     }
  81.     public function setCoverProducts(ProductCollection $coverProducts): void
  82.     {
  83.         $this->coverProducts $coverProducts;
  84.     }
  85. }