1 | <?php |
||
55 | class Event extends Offer implements UpdateableWithCdbXmlInterface |
||
56 | { |
||
57 | protected $eventId; |
||
58 | |||
59 | const MAIN_LANGUAGE_CODE = 'nl'; |
||
60 | |||
61 | public function __construct() |
||
65 | |||
66 | /** |
||
67 | * Factory method to create a new event. |
||
68 | * |
||
69 | * @param Title $title |
||
70 | * @param EventType $eventType |
||
71 | * @param Location $location |
||
72 | * @param CalendarInterface $calendar |
||
73 | * @param Theme|null $theme |
||
74 | * @param \DateTimeImmutable|null $publicationDate |
||
75 | * |
||
76 | * @return Event |
||
77 | */ |
||
78 | public static function create( |
||
109 | |||
110 | /** |
||
111 | * @param string $eventId |
||
112 | * @param string $cdbXml |
||
113 | * @param string $cdbXmlNamespaceUri |
||
114 | * @return Event |
||
115 | */ |
||
116 | public static function importFromUDB2( |
||
132 | |||
133 | /** |
||
134 | * @param EventXmlString $xmlString |
||
135 | * @param StringLiteral $eventId |
||
136 | * @param StringLiteral $cdbXmlNamespaceUri |
||
137 | * @return Event |
||
138 | */ |
||
139 | public static function createFromCdbXml( |
||
155 | |||
156 | /** |
||
157 | * @param StringLiteral $eventId |
||
158 | * @param EventXmlString $xmlString |
||
159 | * @param StringLiteral $cdbXmlNamespaceUri |
||
160 | * @return Event |
||
161 | */ |
||
162 | public function updateFromCdbXml( |
||
175 | |||
176 | /** |
||
177 | * {@inheritdoc} |
||
178 | */ |
||
179 | public function getAggregateRootId() |
||
183 | |||
184 | /** |
||
185 | * @return UUID[] |
||
186 | */ |
||
187 | public function getMediaObjects() |
||
191 | |||
192 | protected function applyEventCreated(EventCreated $eventCreated) |
||
197 | |||
198 | protected function applyEventImportedFromUDB2( |
||
204 | |||
205 | /** |
||
206 | * @param EventUpdatedFromUDB2 $eventUpdated |
||
207 | */ |
||
208 | protected function applyEventUpdatedFromUDB2( |
||
213 | |||
214 | /** |
||
215 | * @param EventCdbXMLInterface $eventCdbXML |
||
216 | */ |
||
217 | protected function setUDB2Data( |
||
228 | |||
229 | /** |
||
230 | * Update the major info. |
||
231 | * |
||
232 | * @param Title $title |
||
233 | * @param EventType $eventType |
||
234 | * @param Location $location |
||
235 | * @param CalendarInterface $calendar |
||
236 | * @param type $theme |
||
237 | */ |
||
238 | public function updateMajorInfo( |
||
247 | |||
248 | protected function applyEventCreatedFromCdbXml( |
||
260 | |||
261 | protected function applyEventUpdatedFromCdbXml( |
||
273 | |||
274 | /** |
||
275 | * @inheritdoc |
||
276 | */ |
||
277 | public function updateWithCdbXml($cdbXml, $cdbXmlNamespaceUri) |
||
287 | |||
288 | /** |
||
289 | * @param Label $label |
||
290 | * @return LabelAdded |
||
291 | */ |
||
292 | protected function createLabelAddedEvent(Label $label) |
||
296 | |||
297 | /** |
||
298 | * @param Label $label |
||
299 | * @return LabelRemoved |
||
300 | */ |
||
301 | protected function createLabelRemovedEvent(Label $label) |
||
305 | |||
306 | /** |
||
307 | * @param Image $image |
||
308 | * @return ImageAdded |
||
309 | */ |
||
310 | protected function createImageAddedEvent(Image $image) |
||
314 | |||
315 | /** |
||
316 | * @param Image $image |
||
317 | * @return ImageRemoved |
||
318 | */ |
||
319 | protected function createImageRemovedEvent(Image $image) |
||
323 | |||
324 | /** |
||
325 | * @param AbstractUpdateImage $updateImageCommand |
||
326 | * @return ImageUpdated |
||
327 | */ |
||
328 | protected function createImageUpdatedEvent( |
||
338 | |||
339 | /** |
||
340 | * @param Image $image |
||
341 | * @return MainImageSelected |
||
342 | */ |
||
343 | protected function createMainImageSelectedEvent(Image $image) |
||
347 | |||
348 | /** |
||
349 | * @param Language $language |
||
350 | * @param StringLiteral $title |
||
351 | * @return TitleTranslated |
||
352 | */ |
||
353 | protected function createTitleTranslatedEvent(Language $language, StringLiteral $title) |
||
357 | |||
358 | /** |
||
359 | * @param Language $language |
||
360 | * @param StringLiteral $description |
||
361 | * @return DescriptionTranslated |
||
362 | */ |
||
363 | protected function createDescriptionTranslatedEvent(Language $language, StringLiteral $description) |
||
367 | |||
368 | /** |
||
369 | * @param string $description |
||
370 | * @return DescriptionUpdated |
||
371 | */ |
||
372 | protected function createDescriptionUpdatedEvent($description) |
||
376 | |||
377 | /** |
||
378 | * @param string $typicalAgeRange |
||
379 | * @return TypicalAgeRangeUpdated |
||
380 | */ |
||
381 | protected function createTypicalAgeRangeUpdatedEvent($typicalAgeRange) |
||
385 | |||
386 | /** |
||
387 | * @return TypicalAgeRangeDeleted |
||
388 | */ |
||
389 | protected function createTypicalAgeRangeDeletedEvent() |
||
393 | |||
394 | /** |
||
395 | * @param string $organizerId |
||
396 | * @return OrganizerUpdated |
||
397 | */ |
||
398 | protected function createOrganizerUpdatedEvent($organizerId) |
||
402 | |||
403 | /** |
||
404 | * @param string $organizerId |
||
405 | * @return OrganizerDeleted |
||
406 | */ |
||
407 | protected function createOrganizerDeletedEvent($organizerId) |
||
411 | |||
412 | /** |
||
413 | * @param ContactPoint $contactPoint |
||
414 | * @return ContactPointUpdated |
||
415 | */ |
||
416 | protected function createContactPointUpdatedEvent(ContactPoint $contactPoint) |
||
420 | |||
421 | /** |
||
422 | * @param BookingInfo $bookingInfo |
||
423 | * @return BookingInfoUpdated |
||
424 | */ |
||
425 | protected function createBookingInfoUpdatedEvent(BookingInfo $bookingInfo) |
||
429 | |||
430 | /** |
||
431 | * @param PriceInfo $priceInfo |
||
432 | * @return PriceInfoUpdated |
||
433 | */ |
||
434 | protected function createPriceInfoUpdatedEvent(PriceInfo $priceInfo) |
||
438 | |||
439 | /** |
||
440 | * @return EventDeleted |
||
441 | */ |
||
442 | protected function createOfferDeletedEvent() |
||
446 | |||
447 | /** |
||
448 | * @inheritdoc |
||
449 | */ |
||
450 | protected function createPublishedEvent(\DateTimeInterface $publicationDate) |
||
454 | |||
455 | /** |
||
456 | * @inheritdoc |
||
457 | */ |
||
458 | protected function createApprovedEvent() |
||
462 | |||
463 | /** |
||
464 | * @inheritdoc |
||
465 | */ |
||
466 | protected function createRejectedEvent(StringLiteral $reason) |
||
470 | |||
471 | /** |
||
472 | * @inheritDoc |
||
473 | */ |
||
474 | protected function createFlaggedAsDuplicate() |
||
478 | |||
479 | /** |
||
480 | * @inheritDoc |
||
481 | */ |
||
482 | protected function createFlaggedAsInappropriate() |
||
486 | } |
||
487 |