vendor/shopware/storefront/Page/Product/ProductPage.php line 16

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Storefront\Page\Product;
  3. use Shopware\Core\Content\Cms\CmsPageEntity;
  4. use Shopware\Core\Content\Product\ProductDefinition;
  5. use Shopware\Core\Content\Product\SalesChannel\CrossSelling\CrossSellingElementCollection;
  6. use Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity;
  7. use Shopware\Core\Content\Property\Aggregate\PropertyGroupOption\PropertyGroupOptionCollection;
  8. use Shopware\Core\Content\Property\PropertyGroupCollection;
  9. use Shopware\Core\Framework\Log\Package;
  10. use Shopware\Storefront\Page\Page;
  11. use Shopware\Storefront\Page\Product\Review\ReviewLoaderResult;
  12. #[Package('storefront')]
  13. class ProductPage extends Page
  14. {
  15.     /**
  16.      * @var SalesChannelProductEntity
  17.      */
  18.     protected $product;
  19.     /**
  20.      * @var CmsPageEntity
  21.      */
  22.     protected $cmsPage;
  23.     protected ?string $navigationId;
  24.     /**
  25.      * @var PropertyGroupCollection
  26.      */
  27.     protected $configuratorSettings;
  28.     /**
  29.      * @var ReviewLoaderResult
  30.      */
  31.     protected $reviewLoaderResult;
  32.     /**
  33.      * @var PropertyGroupOptionCollection
  34.      */
  35.     protected $selectedOptions;
  36.     /**
  37.      * @var CrossSellingElementCollection
  38.      */
  39.     protected $crossSellings;
  40.     public function getProduct(): SalesChannelProductEntity
  41.     {
  42.         return $this->product;
  43.     }
  44.     public function setProduct(SalesChannelProductEntity $product): void
  45.     {
  46.         $this->product $product;
  47.     }
  48.     public function getCmsPage(): ?CmsPageEntity
  49.     {
  50.         return $this->cmsPage;
  51.     }
  52.     public function setCmsPage(CmsPageEntity $cmsPage): void
  53.     {
  54.         $this->cmsPage $cmsPage;
  55.     }
  56.     public function getNavigationId(): ?string
  57.     {
  58.         return $this->navigationId;
  59.     }
  60.     public function setNavigationId(?string $navigationId): void
  61.     {
  62.         $this->navigationId $navigationId;
  63.     }
  64.     public function getConfiguratorSettings(): PropertyGroupCollection
  65.     {
  66.         return $this->configuratorSettings;
  67.     }
  68.     public function setConfiguratorSettings(PropertyGroupCollection $configuratorSettings): void
  69.     {
  70.         $this->configuratorSettings $configuratorSettings;
  71.     }
  72.     public function getReviews(): ReviewLoaderResult
  73.     {
  74.         return $this->reviewLoaderResult;
  75.     }
  76.     public function setReviews(ReviewLoaderResult $result): void
  77.     {
  78.         $this->reviewLoaderResult $result;
  79.     }
  80.     public function getSelectedOptions(): PropertyGroupOptionCollection
  81.     {
  82.         return $this->selectedOptions;
  83.     }
  84.     public function setSelectedOptions(PropertyGroupOptionCollection $selectedOptions): void
  85.     {
  86.         $this->selectedOptions $selectedOptions;
  87.     }
  88.     public function getCrossSellings(): CrossSellingElementCollection
  89.     {
  90.         return $this->crossSellings;
  91.     }
  92.     public function setCrossSellings(CrossSellingElementCollection $crossSellings): void
  93.     {
  94.         $this->crossSellings $crossSellings;
  95.     }
  96.     public function getEntityName(): string
  97.     {
  98.         return ProductDefinition::ENTITY_NAME;
  99.     }
  100. }