1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace JoppeDc\SyliusBetterSeoPlugin\Entity; |
6
|
|
|
|
7
|
|
|
use Sylius\Component\Resource\Model\AbstractTranslation; |
8
|
|
|
use Sylius\Component\Resource\Model\ResourceInterface; |
9
|
|
|
|
10
|
|
|
class SeoTranslation extends AbstractTranslation implements ResourceInterface, SeoTranslationInterface |
11
|
|
|
{ |
12
|
|
|
/** |
13
|
|
|
* @var int|null |
14
|
|
|
*/ |
15
|
|
|
protected $id; |
16
|
|
|
|
17
|
|
|
/** |
18
|
|
|
* @var SeoImageInterface|null |
19
|
|
|
*/ |
20
|
|
|
protected $image; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @var string|null |
24
|
|
|
*/ |
25
|
|
|
private $pageTitle; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var string|null |
29
|
|
|
*/ |
30
|
|
|
private $ogTitle; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var string|null |
34
|
|
|
*/ |
35
|
|
|
private $ogDescription; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var string|null |
39
|
|
|
*/ |
40
|
|
|
private $twitterTitle; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @var string|null |
44
|
|
|
*/ |
45
|
|
|
private $twitterDescription; |
46
|
|
|
|
47
|
|
|
/** |
48
|
|
|
* @var string|null |
49
|
|
|
*/ |
50
|
|
|
private $twitterSite; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @var string|null |
54
|
|
|
*/ |
55
|
|
|
private $extraTags; |
56
|
|
|
|
57
|
|
|
public function getId(): ?int |
58
|
|
|
{ |
59
|
|
|
return $this->id; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
public function setId(?int $id): void |
63
|
|
|
{ |
64
|
|
|
$this->id = $id; |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
public function getPageTitle(): ?string |
68
|
|
|
{ |
69
|
|
|
return $this->pageTitle; |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
public function setPageTitle(?string $pageTitle): void |
73
|
|
|
{ |
74
|
|
|
$this->pageTitle = $pageTitle; |
75
|
|
|
} |
76
|
|
|
|
77
|
|
|
public function getOgTitle(): ?string |
78
|
|
|
{ |
79
|
|
|
return $this->ogTitle; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
public function setOgTitle(?string $ogTitle): void |
83
|
|
|
{ |
84
|
|
|
$this->ogTitle = $ogTitle; |
85
|
|
|
} |
86
|
|
|
|
87
|
|
|
public function getOgDescription(): ?string |
88
|
|
|
{ |
89
|
|
|
return $this->ogDescription; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
public function setOgDescription(?string $ogDescription): void |
93
|
|
|
{ |
94
|
|
|
$this->ogDescription = $ogDescription; |
95
|
|
|
} |
96
|
|
|
|
97
|
|
|
public function getTwitterTitle(): ?string |
98
|
|
|
{ |
99
|
|
|
return $this->twitterTitle; |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
public function setTwitterTitle(?string $twitterTitle): void |
103
|
|
|
{ |
104
|
|
|
$this->twitterTitle = $twitterTitle; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
public function getTwitterDescription(): ?string |
108
|
|
|
{ |
109
|
|
|
return $this->twitterDescription; |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
public function setTwitterDescription(?string $twitterDescription): void |
113
|
|
|
{ |
114
|
|
|
$this->twitterDescription = $twitterDescription; |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
public function getTwitterSite(): ?string |
118
|
|
|
{ |
119
|
|
|
return $this->twitterSite; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
public function setTwitterSite(?string $twitterSite): void |
123
|
|
|
{ |
124
|
|
|
$this->twitterSite = $twitterSite; |
125
|
|
|
} |
126
|
|
|
|
127
|
|
|
public function getExtraTags(): ?string |
128
|
|
|
{ |
129
|
|
|
return $this->extraTags; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
public function setExtraTags(?string $extraTags): void |
133
|
|
|
{ |
134
|
|
|
$this->extraTags = $extraTags; |
135
|
|
|
} |
136
|
|
|
|
137
|
|
|
public function getImage(): ?SeoImageInterface |
138
|
|
|
{ |
139
|
|
|
return $this->image; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
public function setImage(?SeoImageInterface $image): void |
143
|
|
|
{ |
144
|
|
|
if (null !== $image) { |
145
|
|
|
$image->setOwner($this); |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
$this->image = $image; |
149
|
|
|
} |
150
|
|
|
} |
151
|
|
|
|