vendor/shopware/storefront/Page/LandingPage/LandingPage.php line 56

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Storefront\Page\LandingPage;
  3. use Shopware\Core\Content\Cms\CmsPageEntity;
  4. use Shopware\Core\Content\LandingPage\LandingPageDefinition;
  5. use Shopware\Core\Content\LandingPage\LandingPageEntity;
  6. use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait;
  7. use Shopware\Core\Framework\Feature;
  8. use Shopware\Core\Framework\Log\Package;
  9. use Shopware\Storefront\Page\Page;
  10. #[Package('content')]
  11. class LandingPage extends Page
  12. {
  13.     /* @deprecated tag:v6.5.0 Trait will be removed. customFields will be found under the cmsPage and landingPage */
  14.     use EntityCustomFieldsTrait;
  15.     /**
  16.      * @var CmsPageEntity|null
  17.      *
  18.      * @deprecated tag:v6.5.0 $cmsPage will be removed. Use LandingPage->getLandingPage()->getCmsPage() instead
  19.      */
  20.     protected $cmsPage;
  21.     protected ?LandingPageEntity $landingPage;
  22.     /* @deprecated tag:v6.5.0 $navigationId will be removed. Get the Id from LandingPage->getLandingPage()->getId() */
  23.     protected ?string $navigationId;
  24.     /**
  25.      * @var array<mixed>|null
  26.      */
  27.     protected $customFields;
  28.     /**
  29.      * @deprecated tag:v6.5.0 getCmsPage will be removed. Use LandingPage->getLandingPage()->getCmsPage() instead
  30.      */
  31.     public function getCmsPage(): ?CmsPageEntity
  32.     {
  33.         Feature::triggerDeprecationOrThrow(
  34.             'v6.5.0.0',
  35.             Feature::deprecatedMethodMessage(__CLASS__'getCmsPage''v6.5.0.0''LandingPage->getLandingPage()->getCmsPage()')
  36.         );
  37.         return $this->cmsPage;
  38.     }
  39.     /**
  40.      * @deprecated tag:v6.5.0 setCmsPage will be removed.
  41.      */
  42.     public function setCmsPage(CmsPageEntity $cmsPage): void
  43.     {
  44.         Feature::triggerDeprecationOrThrow(
  45.             'v6.5.0.0',
  46.             Feature::deprecatedMethodMessage(__CLASS__'setCmsPage''v6.5.0.0')
  47.         );
  48.         $this->cmsPage $cmsPage;
  49.     }
  50.     /**
  51.      * @deprecated tag:v6.5.0 $navigationId will be removed. Get the Id from LandingPage->getLandingPage()->getId()
  52.      */
  53.     public function getNavigationId(): ?string
  54.     {
  55.         Feature::triggerDeprecationOrThrow(
  56.             'v6.5.0.0',
  57.             Feature::deprecatedMethodMessage(__CLASS__'getNavigationId''v6.5.0.0''LandingPage->getLandingPage()->getId()')
  58.         );
  59.         return $this->navigationId;
  60.     }
  61.     /**
  62.      * @deprecated tag:v6.5.0 $navigationId will be removed.
  63.      */
  64.     public function setNavigationId(?string $navigationId): void
  65.     {
  66.         Feature::triggerDeprecationOrThrow(
  67.             'v6.5.0.0',
  68.             Feature::deprecatedMethodMessage(__CLASS__'setNavigationId''v6.5.0.0')
  69.         );
  70.         $this->navigationId $navigationId;
  71.     }
  72.     public function getEntityName(): string
  73.     {
  74.         return LandingPageDefinition::ENTITY_NAME;
  75.     }
  76.     public function getLandingPage(): ?LandingPageEntity
  77.     {
  78.         return $this->landingPage;
  79.     }
  80.     public function setLandingPage(?LandingPageEntity $landingPage): void
  81.     {
  82.         $this->landingPage $landingPage;
  83.     }
  84. }