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

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