1 | <?php |
||
51 | class Event extends Offer implements UpdateableWithCdbXmlInterface |
||
52 | { |
||
53 | protected $eventId; |
||
54 | |||
55 | const MAIN_LANGUAGE_CODE = 'nl'; |
||
56 | |||
57 | public function __construct() |
||
61 | |||
62 | /** |
||
63 | * Factory method to create a new event. |
||
64 | * |
||
65 | * @param Title $title |
||
66 | * @param EventType $eventType |
||
67 | * @param Location $location |
||
68 | * @param CalendarInterface $calendar |
||
69 | * @param Theme|null $theme |
||
70 | * @param \DateTimeImmutable|null $publicationDate |
||
71 | * |
||
72 | * @return Event |
||
73 | */ |
||
74 | public static function create( |
||
105 | |||
106 | /** |
||
107 | * @param string $eventId |
||
108 | * @param string $cdbXml |
||
109 | * @param string $cdbXmlNamespaceUri |
||
110 | * @return Event |
||
111 | */ |
||
112 | public static function importFromUDB2( |
||
128 | |||
129 | /** |
||
130 | * {@inheritdoc} |
||
131 | */ |
||
132 | public function getAggregateRootId() |
||
136 | |||
137 | /** |
||
138 | * @return UUID[] |
||
139 | */ |
||
140 | public function getMediaObjects() |
||
144 | |||
145 | protected function applyEventCreated(EventCreated $eventCreated) |
||
150 | |||
151 | protected function applyEventImportedFromUDB2( |
||
157 | |||
158 | /** |
||
159 | * @param EventUpdatedFromUDB2 $eventUpdated |
||
160 | */ |
||
161 | protected function applyEventUpdatedFromUDB2( |
||
166 | |||
167 | /** |
||
168 | * @param EventCdbXMLInterface $eventCdbXML |
||
169 | */ |
||
170 | protected function setUDB2Data( |
||
181 | |||
182 | /** |
||
183 | * Update the major info. |
||
184 | * |
||
185 | * @param Title $title |
||
186 | * @param EventType $eventType |
||
187 | * @param Location $location |
||
188 | * @param CalendarInterface $calendar |
||
189 | * @param type $theme |
||
190 | */ |
||
191 | public function updateMajorInfo( |
||
200 | |||
201 | /** |
||
202 | * @inheritdoc |
||
203 | */ |
||
204 | public function updateWithCdbXml($cdbXml, $cdbXmlNamespaceUri) |
||
214 | |||
215 | /** |
||
216 | * @param Label $label |
||
217 | * @return LabelAdded |
||
218 | */ |
||
219 | protected function createLabelAddedEvent(Label $label) |
||
223 | |||
224 | /** |
||
225 | * @param Label $label |
||
226 | * @return LabelRemoved |
||
227 | */ |
||
228 | protected function createLabelRemovedEvent(Label $label) |
||
232 | |||
233 | /** |
||
234 | * @param Image $image |
||
235 | * @return ImageAdded |
||
236 | */ |
||
237 | protected function createImageAddedEvent(Image $image) |
||
241 | |||
242 | /** |
||
243 | * @param Image $image |
||
244 | * @return ImageRemoved |
||
245 | */ |
||
246 | protected function createImageRemovedEvent(Image $image) |
||
250 | |||
251 | /** |
||
252 | * @param AbstractUpdateImage $updateImageCommand |
||
253 | * @return ImageUpdated |
||
254 | */ |
||
255 | protected function createImageUpdatedEvent( |
||
265 | |||
266 | /** |
||
267 | * @param Image $image |
||
268 | * @return MainImageSelected |
||
269 | */ |
||
270 | protected function createMainImageSelectedEvent(Image $image) |
||
274 | |||
275 | /** |
||
276 | * @param Language $language |
||
277 | * @param StringLiteral $title |
||
278 | * @return TitleTranslated |
||
279 | */ |
||
280 | protected function createTitleTranslatedEvent(Language $language, StringLiteral $title) |
||
284 | |||
285 | /** |
||
286 | * @param Language $language |
||
287 | * @param StringLiteral $description |
||
288 | * @return DescriptionTranslated |
||
289 | */ |
||
290 | protected function createDescriptionTranslatedEvent(Language $language, StringLiteral $description) |
||
294 | |||
295 | /** |
||
296 | * @param string $description |
||
297 | * @return DescriptionUpdated |
||
298 | */ |
||
299 | protected function createDescriptionUpdatedEvent($description) |
||
303 | |||
304 | /** |
||
305 | * @param string $typicalAgeRange |
||
306 | * @return TypicalAgeRangeUpdated |
||
307 | */ |
||
308 | protected function createTypicalAgeRangeUpdatedEvent($typicalAgeRange) |
||
312 | |||
313 | /** |
||
314 | * @return TypicalAgeRangeDeleted |
||
315 | */ |
||
316 | protected function createTypicalAgeRangeDeletedEvent() |
||
320 | |||
321 | /** |
||
322 | * @param string $organizerId |
||
323 | * @return OrganizerUpdated |
||
324 | */ |
||
325 | protected function createOrganizerUpdatedEvent($organizerId) |
||
329 | |||
330 | /** |
||
331 | * @param string $organizerId |
||
332 | * @return OrganizerDeleted |
||
333 | */ |
||
334 | protected function createOrganizerDeletedEvent($organizerId) |
||
338 | |||
339 | /** |
||
340 | * @param ContactPoint $contactPoint |
||
341 | * @return ContactPointUpdated |
||
342 | */ |
||
343 | protected function createContactPointUpdatedEvent(ContactPoint $contactPoint) |
||
347 | |||
348 | /** |
||
349 | * @param BookingInfo $bookingInfo |
||
350 | * @return BookingInfoUpdated |
||
351 | */ |
||
352 | protected function createBookingInfoUpdatedEvent(BookingInfo $bookingInfo) |
||
356 | |||
357 | /** |
||
358 | * @param PriceInfo $priceInfo |
||
359 | * @return PriceInfoUpdated |
||
360 | */ |
||
361 | protected function createPriceInfoUpdatedEvent(PriceInfo $priceInfo) |
||
365 | |||
366 | /** |
||
367 | * @return EventDeleted |
||
368 | */ |
||
369 | protected function createOfferDeletedEvent() |
||
373 | |||
374 | /** |
||
375 | * @inheritdoc |
||
376 | */ |
||
377 | protected function createPublishedEvent(\DateTimeInterface $publicationDate) |
||
381 | |||
382 | /** |
||
383 | * @inheritdoc |
||
384 | */ |
||
385 | protected function createApprovedEvent() |
||
389 | |||
390 | /** |
||
391 | * @inheritdoc |
||
392 | */ |
||
393 | protected function createRejectedEvent(StringLiteral $reason) |
||
397 | |||
398 | /** |
||
399 | * @inheritDoc |
||
400 | */ |
||
401 | protected function createFlaggedAsDuplicate() |
||
405 | |||
406 | /** |
||
407 | * @inheritDoc |
||
408 | */ |
||
409 | protected function createFlaggedAsInappropriate() |
||
413 | } |
||
414 |