|
1
|
|
|
<?php declare(strict_types=1); |
|
2
|
|
|
|
|
3
|
|
|
namespace Shopware\Storefront\Page\LandingPage; |
|
4
|
|
|
|
|
5
|
|
|
use Shopware\Core\Content\Cms\CmsPageEntity; |
|
6
|
|
|
use Shopware\Core\Content\LandingPage\LandingPageDefinition; |
|
7
|
|
|
use Shopware\Core\Content\LandingPage\LandingPageEntity; |
|
8
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait; |
|
9
|
|
|
use Shopware\Core\Framework\Feature; |
|
10
|
|
|
use Shopware\Storefront\Page\Page; |
|
11
|
|
|
|
|
12
|
|
|
class LandingPage extends Page |
|
13
|
|
|
{ |
|
14
|
|
|
/* @deprecated tag:v6.5.0 Trait will be removed. customFields will be found under the cmsPage and landingPage */ |
|
15
|
|
|
use EntityCustomFieldsTrait; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @var CmsPageEntity|null |
|
19
|
|
|
* |
|
20
|
|
|
* @deprecated tag:v6.5.0 $cmsPage will be removed. Use LandingPage->getLandingPage()->getCmsPage() instead |
|
21
|
|
|
*/ |
|
22
|
|
|
protected $cmsPage; |
|
23
|
|
|
|
|
24
|
|
|
protected ?LandingPageEntity $landingPage; |
|
25
|
|
|
|
|
26
|
|
|
/* @deprecated tag:v6.5.0 $navigationId will be removed. Get the Id from LandingPage->getLandingPage()->getId() */ |
|
27
|
|
|
protected ?string $navigationId; |
|
28
|
|
|
|
|
29
|
|
|
/** |
|
30
|
|
|
* @var array<mixed>|null |
|
31
|
|
|
*/ |
|
32
|
|
|
protected $customFields; |
|
33
|
|
|
|
|
34
|
|
|
/** |
|
35
|
|
|
* @deprecated tag:v6.5.0 getCmsPage will be removed. Use LandingPage->getLandingPage()->getCmsPage() instead |
|
36
|
|
|
*/ |
|
37
|
|
|
public function getCmsPage(): ?CmsPageEntity |
|
38
|
|
|
{ |
|
39
|
|
|
Feature::triggerDeprecationOrThrow( |
|
40
|
|
|
'v6.5.0.0', |
|
41
|
|
|
Feature::deprecatedMethodMessage(__CLASS__, 'getCmsPage', 'v6.5.0.0', 'LandingPage->getLandingPage()->getCmsPage()') |
|
42
|
|
|
); |
|
43
|
|
|
|
|
44
|
|
|
return $this->cmsPage; |
|
|
|
|
|
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
/** |
|
48
|
|
|
* @deprecated tag:v6.5.0 setCmsPage will be removed. |
|
49
|
|
|
*/ |
|
50
|
|
|
public function setCmsPage(CmsPageEntity $cmsPage): void |
|
51
|
|
|
{ |
|
52
|
|
|
Feature::triggerDeprecationOrThrow( |
|
53
|
|
|
'v6.5.0.0', |
|
54
|
|
|
Feature::deprecatedMethodMessage(__CLASS__, 'setCmsPage', 'v6.5.0.0') |
|
55
|
|
|
); |
|
56
|
|
|
|
|
57
|
|
|
$this->cmsPage = $cmsPage; |
|
|
|
|
|
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
/** |
|
61
|
|
|
* @deprecated tag:v6.5.0 $navigationId will be removed. Get the Id from LandingPage->getLandingPage()->getId() |
|
62
|
|
|
*/ |
|
63
|
|
|
public function getNavigationId(): ?string |
|
64
|
|
|
{ |
|
65
|
|
|
Feature::triggerDeprecationOrThrow( |
|
66
|
|
|
'v6.5.0.0', |
|
67
|
|
|
Feature::deprecatedMethodMessage(__CLASS__, 'getNavigationId', 'v6.5.0.0', 'LandingPage->getLandingPage()->getId()') |
|
68
|
|
|
); |
|
69
|
|
|
|
|
70
|
|
|
return $this->navigationId; |
|
|
|
|
|
|
71
|
|
|
} |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* @deprecated tag:v6.5.0 $navigationId will be removed. |
|
75
|
|
|
*/ |
|
76
|
|
|
public function setNavigationId(?string $navigationId): void |
|
77
|
|
|
{ |
|
78
|
|
|
Feature::triggerDeprecationOrThrow( |
|
79
|
|
|
'v6.5.0.0', |
|
80
|
|
|
Feature::deprecatedMethodMessage(__CLASS__, 'setNavigationId', 'v6.5.0.0') |
|
81
|
|
|
); |
|
82
|
|
|
|
|
83
|
|
|
$this->navigationId = $navigationId; |
|
|
|
|
|
|
84
|
|
|
} |
|
85
|
|
|
|
|
86
|
|
|
public function getEntityName(): string |
|
87
|
|
|
{ |
|
88
|
|
|
return LandingPageDefinition::ENTITY_NAME; |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
public function getLandingPage(): ?LandingPageEntity |
|
92
|
|
|
{ |
|
93
|
|
|
return $this->landingPage; |
|
94
|
|
|
} |
|
95
|
|
|
|
|
96
|
|
|
public function setLandingPage(?LandingPageEntity $landingPage): void |
|
97
|
|
|
{ |
|
98
|
|
|
$this->landingPage = $landingPage; |
|
99
|
|
|
} |
|
100
|
|
|
} |
|
101
|
|
|
|
This property has been deprecated. The supplier of the class has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the property will be removed from the class and what other property to use instead.