1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the slince/shopify-api-php |
5
|
|
|
* |
6
|
|
|
* (c) Slince <[email protected]> |
7
|
|
|
* |
8
|
|
|
* This source file is subject to the MIT license that is bundled |
9
|
|
|
* with this source code in the file LICENSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Slince\Shopify\Manager\Page; |
13
|
|
|
|
14
|
|
|
use Slince\Shopify\Common\Model\Model; |
15
|
|
|
use Slince\Shopify\Common\Model\AdminGraphqlApiId; |
16
|
|
|
|
17
|
|
|
class Page extends Model |
18
|
|
|
{ |
19
|
|
|
use AdminGraphqlApiId; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* @var string |
23
|
|
|
*/ |
24
|
|
|
protected $title; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @var int |
28
|
|
|
*/ |
29
|
|
|
protected $shopId; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @var string |
33
|
|
|
*/ |
34
|
|
|
protected $handle; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @var string |
38
|
|
|
*/ |
39
|
|
|
protected $bodyHtml; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @var string |
43
|
|
|
*/ |
44
|
|
|
protected $author; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @var \DateTimeInterface |
48
|
|
|
*/ |
49
|
|
|
protected $createdAt; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @var \DateTimeInterface |
53
|
|
|
*/ |
54
|
|
|
protected $updatedAt; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @var \DateTimeInterface |
58
|
|
|
*/ |
59
|
|
|
protected $publishedAt; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @var string |
63
|
|
|
*/ |
64
|
|
|
protected $templateSuffix; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return string |
68
|
|
|
*/ |
69
|
|
|
public function getTitle() |
70
|
|
|
{ |
71
|
|
|
return $this->title; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param string $title |
76
|
|
|
* |
77
|
|
|
* @return Page |
78
|
|
|
*/ |
79
|
|
|
public function setTitle($title) |
80
|
|
|
{ |
81
|
|
|
$this->title = $title; |
82
|
|
|
|
83
|
|
|
return $this; |
84
|
|
|
} |
85
|
|
|
|
86
|
|
|
/** |
87
|
|
|
* @return int |
88
|
|
|
*/ |
89
|
|
|
public function getShopId() |
90
|
|
|
{ |
91
|
|
|
return $this->shopId; |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
/** |
95
|
|
|
* @param int $shopId |
96
|
|
|
* |
97
|
|
|
* @return Page |
98
|
|
|
*/ |
99
|
|
|
public function setShopId($shopId) |
100
|
|
|
{ |
101
|
|
|
$this->shopId = $shopId; |
102
|
|
|
|
103
|
|
|
return $this; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return string |
108
|
|
|
*/ |
109
|
|
|
public function getHandle() |
110
|
|
|
{ |
111
|
|
|
return $this->handle; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @param string $handle |
116
|
|
|
* |
117
|
|
|
* @return Page |
118
|
|
|
*/ |
119
|
|
|
public function setHandle($handle) |
120
|
|
|
{ |
121
|
|
|
$this->handle = $handle; |
122
|
|
|
|
123
|
|
|
return $this; |
124
|
|
|
} |
125
|
|
|
|
126
|
|
|
/** |
127
|
|
|
* @return string |
128
|
|
|
*/ |
129
|
|
|
public function getBodyHtml() |
130
|
|
|
{ |
131
|
|
|
return $this->bodyHtml; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* @param string $bodyHtml |
136
|
|
|
* |
137
|
|
|
* @return Page |
138
|
|
|
*/ |
139
|
|
|
public function setBodyHtml($bodyHtml) |
140
|
|
|
{ |
141
|
|
|
$this->bodyHtml = $bodyHtml; |
142
|
|
|
|
143
|
|
|
return $this; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @return string |
148
|
|
|
*/ |
149
|
|
|
public function getAuthor() |
150
|
|
|
{ |
151
|
|
|
return $this->author; |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @param string $author |
156
|
|
|
* |
157
|
|
|
* @return Page |
158
|
|
|
*/ |
159
|
|
|
public function setAuthor($author) |
160
|
|
|
{ |
161
|
|
|
$this->author = $author; |
162
|
|
|
|
163
|
|
|
return $this; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* @return \DateTimeInterface |
168
|
|
|
*/ |
169
|
|
|
public function getCreatedAt() |
170
|
|
|
{ |
171
|
|
|
return $this->createdAt; |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
/** |
175
|
|
|
* @param \DateTimeInterface $createdAt |
176
|
|
|
* |
177
|
|
|
* @return Page |
178
|
|
|
*/ |
179
|
|
|
public function setCreatedAt($createdAt) |
180
|
|
|
{ |
181
|
|
|
$this->createdAt = $createdAt; |
182
|
|
|
|
183
|
|
|
return $this; |
184
|
|
|
} |
185
|
|
|
|
186
|
|
|
/** |
187
|
|
|
* @return \DateTimeInterface |
188
|
|
|
*/ |
189
|
|
|
public function getUpdatedAt() |
190
|
|
|
{ |
191
|
|
|
return $this->updatedAt; |
192
|
|
|
} |
193
|
|
|
|
194
|
|
|
/** |
195
|
|
|
* @param \DateTimeInterface $updatedAt |
196
|
|
|
* |
197
|
|
|
* @return Page |
198
|
|
|
*/ |
199
|
|
|
public function setUpdatedAt($updatedAt) |
200
|
|
|
{ |
201
|
|
|
$this->updatedAt = $updatedAt; |
202
|
|
|
|
203
|
|
|
return $this; |
204
|
|
|
} |
205
|
|
|
|
206
|
|
|
/** |
207
|
|
|
* @return \DateTimeInterface |
208
|
|
|
*/ |
209
|
|
|
public function getPublishedAt() |
210
|
|
|
{ |
211
|
|
|
return $this->publishedAt; |
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
/** |
215
|
|
|
* @param \DateTimeInterface $publishedAt |
216
|
|
|
* |
217
|
|
|
* @return Page |
218
|
|
|
*/ |
219
|
|
|
public function setPublishedAt($publishedAt) |
220
|
|
|
{ |
221
|
|
|
$this->publishedAt = $publishedAt; |
222
|
|
|
|
223
|
|
|
return $this; |
224
|
|
|
} |
225
|
|
|
|
226
|
|
|
/** |
227
|
|
|
* @return string |
228
|
|
|
*/ |
229
|
|
|
public function getTemplateSuffix() |
230
|
|
|
{ |
231
|
|
|
return $this->templateSuffix; |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
/** |
235
|
|
|
* @param string $templateSuffix |
236
|
|
|
* |
237
|
|
|
* @return Page |
238
|
|
|
*/ |
239
|
|
|
public function setTemplateSuffix($templateSuffix) |
240
|
|
|
{ |
241
|
|
|
$this->templateSuffix = $templateSuffix; |
242
|
|
|
|
243
|
|
|
return $this; |
244
|
|
|
} |
245
|
|
|
} |