Completed
Push — master ( a01b1b...f36eb7 )
by
unknown
05:53
created

applyOrganizerProjectedToJSONLD()   B

Complexity

Conditions 3
Paths 3

Size

Total Lines 27
Code Lines 15

Duplication

Lines 27
Ratio 100 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 27
loc 27
rs 8.8571
cc 3
eloc 15
nc 3
nop 1
1
<?php
2
3
namespace CultuurNet\UDB3\Place\ReadModel\JSONLD;
4
5
use Broadway\Domain\DateTime;
6
use Broadway\Domain\DomainMessage;
7
use Broadway\EventHandling\EventListenerInterface;
8
use CultuurNet\UDB3\Actor\ActorImportedFromUDB2;
9
use CultuurNet\UDB3\Address\Address;
10
use CultuurNet\UDB3\Cdb\ActorItemFactory;
11
use CultuurNet\UDB3\EntityServiceInterface;
12
use CultuurNet\UDB3\Event\EventType;
13
use CultuurNet\UDB3\Event\ReadModel\DocumentGoneException;
14
use CultuurNet\UDB3\Event\ReadModel\DocumentRepositoryInterface;
15
use CultuurNet\UDB3\EventListener\EventSpecification;
16
use CultuurNet\UDB3\Iri\IriGeneratorInterface;
17
use CultuurNet\UDB3\Language;
18
use CultuurNet\UDB3\Offer\AvailableTo;
19
use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferLDProjector;
20
use CultuurNet\UDB3\Offer\ReadModel\JSONLD\OfferUpdate;
21
use CultuurNet\UDB3\Offer\WorkflowStatus;
22
use CultuurNet\UDB3\Organizer\OrganizerProjectedToJSONLD;
23
use CultuurNet\UDB3\Place\Events\AddressTranslated;
24
use CultuurNet\UDB3\Place\Events\AddressUpdated;
25
use CultuurNet\UDB3\Place\Events\BookingInfoUpdated;
26
use CultuurNet\UDB3\Place\Events\CalendarUpdated;
27
use CultuurNet\UDB3\Place\Events\ContactPointUpdated;
28
use CultuurNet\UDB3\Place\Events\DescriptionTranslated;
29
use CultuurNet\UDB3\Place\Events\DescriptionUpdated;
30
use CultuurNet\UDB3\Place\Events\FacilitiesUpdated;
31
use CultuurNet\UDB3\Place\Events\GeoCoordinatesUpdated;
32
use CultuurNet\UDB3\Place\Events\Image\ImagesImportedFromUDB2;
33
use CultuurNet\UDB3\Place\Events\Image\ImagesUpdatedFromUDB2;
34
use CultuurNet\UDB3\Place\Events\ImageAdded;
35
use CultuurNet\UDB3\Place\Events\ImageRemoved;
36
use CultuurNet\UDB3\Place\Events\ImageUpdated;
37
use CultuurNet\UDB3\Place\Events\LabelAdded;
38
use CultuurNet\UDB3\Place\Events\LabelRemoved;
39
use CultuurNet\UDB3\Place\Events\MainImageSelected;
40
use CultuurNet\UDB3\Place\Events\MajorInfoUpdated;
41
use CultuurNet\UDB3\Place\Events\Moderation\Approved;
42
use CultuurNet\UDB3\Place\Events\Moderation\FlaggedAsDuplicate;
43
use CultuurNet\UDB3\Place\Events\Moderation\FlaggedAsInappropriate;
44
use CultuurNet\UDB3\Place\Events\Moderation\Published;
45
use CultuurNet\UDB3\Place\Events\Moderation\Rejected;
46
use CultuurNet\UDB3\Place\Events\OrganizerDeleted;
47
use CultuurNet\UDB3\Place\Events\OrganizerUpdated;
48
use CultuurNet\UDB3\Place\Events\PlaceCreated;
49
use CultuurNet\UDB3\Place\Events\PlaceDeleted;
50
use CultuurNet\UDB3\Place\Events\PlaceImportedFromUDB2;
51
use CultuurNet\UDB3\Place\Events\PlaceUpdatedFromUDB2;
52
use CultuurNet\UDB3\Place\Events\PriceInfoUpdated;
53
use CultuurNet\UDB3\Place\Events\ThemeUpdated;
54
use CultuurNet\UDB3\Place\Events\TitleTranslated;
55
use CultuurNet\UDB3\Place\Events\TitleUpdated;
56
use CultuurNet\UDB3\Place\Events\TypeUpdated;
57
use CultuurNet\UDB3\Place\Events\TypicalAgeRangeDeleted;
58
use CultuurNet\UDB3\Place\Events\TypicalAgeRangeUpdated;
59
use CultuurNet\UDB3\Place\ReadModel\Relations\RepositoryInterface;
60
use CultuurNet\UDB3\ReadModel\JsonDocument;
61
use CultuurNet\UDB3\ReadModel\JsonDocumentMetaDataEnricherInterface;
62
use CultuurNet\UDB3\Theme;
63
use Symfony\Component\Serializer\SerializerInterface;
64
65
/**
66
 * Projects state changes on Place entities to a JSON-LD read model in a
67
 * document repository.
68
 */
69
class PlaceLDProjector extends OfferLDProjector implements EventListenerInterface
70
{
71
    /**
72
     * @var RepositoryInterface
73
     */
74
    private $placeRelations;
75
76
    /**
77
     * @var CdbXMLImporter
78
     */
79
    protected $cdbXMLImporter;
80
81
    /**
82
     * @param DocumentRepositoryInterface $repository
83
     * @param IriGeneratorInterface $iriGenerator
84
     * @param EntityServiceInterface $organizerService
85
     * @param RepositoryInterface $placeRelations
86
     * @param SerializerInterface $mediaObjectSerializer
87
     * @param CdbXMLImporter $cdbXMLImporter
88
     * @param JsonDocumentMetaDataEnricherInterface $jsonDocumentMetaDataEnricher
89
     * @param EventSpecification $eventFilter
90
     */
91
    public function __construct(
92
        DocumentRepositoryInterface $repository,
93
        IriGeneratorInterface $iriGenerator,
94
        EntityServiceInterface $organizerService,
95
        RepositoryInterface $placeRelations,
96
        SerializerInterface $mediaObjectSerializer,
97
        CdbXMLImporter $cdbXMLImporter,
98
        JsonDocumentMetaDataEnricherInterface $jsonDocumentMetaDataEnricher,
99
        EventSpecification $eventFilter
100
    ) {
101
        parent::__construct(
102
            $repository,
103
            $iriGenerator,
104
            $organizerService,
105
            $mediaObjectSerializer,
106
            $jsonDocumentMetaDataEnricher,
107
            $eventFilter
108
        );
109
110
        $this->placeRelations = $placeRelations;
111
112
        $this->cdbXMLImporter = $cdbXMLImporter;
113
    }
114
115
    /**
116
     * @param PlaceImportedFromUDB2 $placeImportedFromUDB2
117
     * @return JsonDocument
118
     */
119
    protected function applyPlaceImportedFromUDB2(
120
        PlaceImportedFromUDB2 $placeImportedFromUDB2
121
    ) {
122
        return $this->projectActorImportedFromUDB2($placeImportedFromUDB2);
123
    }
124
125
    /**
126
     * @param PlaceUpdatedFromUDB2 $placeUpdatedFromUDB2
127
     * @return JsonDocument
128
     */
129
    protected function applyPlaceUpdatedFromUDB2(
130
        PlaceUpdatedFromUDB2 $placeUpdatedFromUDB2
131
    ) {
132
        return $this->projectActorImportedFromUDB2($placeUpdatedFromUDB2);
133
    }
134
135
    /**
136
     * @param ActorImportedFromUDB2 $actorImportedFromUDB2
137
     * @return JsonDocument
138
     */
139
    protected function projectActorImportedFromUDB2(
140
        ActorImportedFromUDB2 $actorImportedFromUDB2
141
    ) {
142
        $actorId = $actorImportedFromUDB2->getActorId();
143
144
        $udb2Actor = ActorItemFactory::createActorFromCdbXml(
145
            $actorImportedFromUDB2->getCdbXmlNamespaceUri(),
146
            $actorImportedFromUDB2->getCdbXml()
147
        );
148
149
        try {
150
            $document = $this->loadPlaceDocumentFromRepositoryById($actorId);
151
        } catch (DocumentGoneException $e) {
152
            $document = $this->newDocument($actorId);
153
        }
154
155
        $actorLd = $document->getBody();
156
157
        $actorLd = $this->cdbXMLImporter->documentWithCdbXML(
158
            $actorLd,
159
            $udb2Actor
160
        );
161
162
        $this->setMainLanguage($actorLd, new Language('nl'));
163
164
        // Remove geocoordinates, because the address might have been
165
        // updated and we might get inconsistent data if it takes a while
166
        // before the new geocoordinates are added.
167
        // In case geocoding fails, it's also easier to look for places that
168
        // have no geocoordinates instead of places that have incorrect
169
        // geocoordinates.
170
        unset($actorLd->geo);
171
172
        return $document->withBody($actorLd);
173
    }
174
175
    /**
176
     * @param string $id
177
     * @return JsonDocument
178
     */
179 View Code Duplication
    protected function newDocument($id)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
180
    {
181
        $document = new JsonDocument($id);
182
183
        $placeLd = $document->getBody();
184
        $placeLd->{'@id'} = $this->iriGenerator->iri($id);
185
        $placeLd->{'@context'} = '/contexts/place';
186
187
        return $document->withBody($placeLd);
188
    }
189
190
    /**
191
     * @param PlaceCreated $placeCreated
192
     * @param DomainMessage $domainMessage
193
     * @return JsonDocument
194
     */
195
    protected function applyPlaceCreated(PlaceCreated $placeCreated, DomainMessage $domainMessage)
196
    {
197
        $document = $this->newDocument($placeCreated->getPlaceId());
198
199
        $jsonLD = $document->getBody();
200
201
        $jsonLD->{'@id'} = $this->iriGenerator->iri(
202
            $placeCreated->getPlaceId()
203
        );
204
205
        $this->setMainLanguage($jsonLD, new Language('nl'));
206
207
        if (empty($jsonLD->name)) {
208
            $jsonLD->name = new \stdClass();
209
        }
210
211
        $jsonLD->name->nl = $placeCreated->getTitle();
212
213
        $this->setAddress(
214
            $jsonLD,
215
            $placeCreated->getAddress(),
216
            $this->getMainLanguage($jsonLD)
217
        );
218
219
        $calendarJsonLD = $placeCreated->getCalendar()->toJsonLd();
220
        $jsonLD = (object) array_merge((array) $jsonLD, $calendarJsonLD);
221
222
        $availableTo = AvailableTo::createFromCalendar($placeCreated->getCalendar());
223
        $jsonLD->availableTo = (string)$availableTo;
224
225
        $eventType = $placeCreated->getEventType();
226
        $jsonLD->terms = [
227
            $eventType->toJsonLd(),
228
        ];
229
230
        $theme = $placeCreated->getTheme();
231
        if (!empty($theme)) {
232
            $jsonLD->terms[] = $theme->toJsonLd();
233
        }
234
235
        $recordedOn = $domainMessage->getRecordedOn()->toString();
236
        $jsonLD->created = \DateTime::createFromFormat(
237
            DateTime::FORMAT_STRING,
238
            $recordedOn
239
        )->format('c');
240
241
        $jsonLD->modified = $jsonLD->created;
242
243
        $metaData = $domainMessage->getMetadata()->serialize();
244 View Code Duplication
        if (isset($metaData['user_email'])) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
245
            $jsonLD->creator = $metaData['user_email'];
246
        } elseif (isset($metaData['user_nick'])) {
247
            $jsonLD->creator = $metaData['user_nick'];
248
        }
249
250
        $jsonLD->workflowStatus = WorkflowStatus::DRAFT()->getName();
251
252
        return $document->withBody($jsonLD);
253
    }
254
255
    /**
256
     * @param PlaceDeleted $placeDeleted
257
     * @return null
258
     */
259 View Code Duplication
    protected function applyPlaceDeleted(PlaceDeleted $placeDeleted)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
260
    {
261
        $document = $this->loadDocumentFromRepository($placeDeleted);
262
263
        $jsonLD = $document->getBody();
264
265
        $jsonLD->workflowStatus = WorkflowStatus::DELETED()->getName();
266
267
        return $document->withBody($jsonLD);
268
    }
269
270
    /**
271
     * Apply the major info updated command to the projector.
272
     * @param MajorInfoUpdated $majorInfoUpdated
273
     * @return JsonDocument
274
     */
275
    protected function applyMajorInfoUpdated(MajorInfoUpdated $majorInfoUpdated)
276
    {
277
        $document = $this
278
            ->loadPlaceDocumentFromRepositoryById($majorInfoUpdated->getPlaceId())
279
            ->apply(OfferUpdate::calendar($majorInfoUpdated->getCalendar()));
0 ignored issues
show
Compatibility introduced by
$majorInfoUpdated->getCalendar() of type object<CultuurNet\UDB3\CalendarInterface> is not a sub-type of object<CultuurNet\UDB3\Calendar>. It seems like you assume a concrete implementation of the interface CultuurNet\UDB3\CalendarInterface to be always present.

This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.

Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.

Loading history...
280
281
        $jsonLD = $document->getBody();
282
283
        $jsonLD->name->nl = $majorInfoUpdated->getTitle();
284
285
        $this->setAddress(
286
            $jsonLD,
287
            $majorInfoUpdated->getAddress(),
288
            $this->getMainLanguage($jsonLD)
289
        );
290
291
        $availableTo = AvailableTo::createFromCalendar($majorInfoUpdated->getCalendar());
292
        $jsonLD->availableTo = (string)$availableTo;
293
294
        // Remove old theme and event type.
295
        $jsonLD->terms = array_filter($jsonLD->terms, function ($term) {
296
            return $term->domain !== EventType::DOMAIN &&  $term->domain !== Theme::DOMAIN;
297
        });
298
299
        $eventType = $majorInfoUpdated->getEventType();
300
        $jsonLD->terms = [
301
            $eventType->toJsonLd(),
302
        ];
303
304
        $theme = $majorInfoUpdated->getTheme();
305
        if (!empty($theme)) {
306
            $jsonLD->terms[] = $theme->toJsonLd();
307
        }
308
309
        // Remove geocoordinates, because the address might have been
310
        // updated and we might get inconsistent data if it takes a while
311
        // before the new geocoordinates are added.
312
        // In case geocoding fails, it's also easier to look for places that
313
        // have no geocoordinates instead of places that have incorrect
314
        // geocoordinates.
315
        unset($jsonLD->geo);
316
317
        return $document->withBody($jsonLD);
318
    }
319
320
    /**
321
     * @param AddressUpdated $addressUpdated
322
     * @return JsonDocument
323
     */
324 View Code Duplication
    protected function applyAddressUpdated(AddressUpdated $addressUpdated)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
325
    {
326
        $document = $this->loadPlaceDocumentFromRepositoryById($addressUpdated->getPlaceId());
327
        $jsonLD = $document->getBody();
328
        $this->setAddress($jsonLD, $addressUpdated->getAddress(), $this->getMainLanguage($jsonLD));
329
        return $document->withBody($jsonLD);
330
    }
331
332
    /**
333
     * @param AddressTranslated $addressTranslated
334
     * @return JsonDocument
335
     */
336 View Code Duplication
    protected function applyAddressTranslated(AddressTranslated $addressTranslated)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
337
    {
338
        $document = $this->loadPlaceDocumentFromRepositoryById($addressTranslated->getPlaceId());
339
        $jsonLD = $document->getBody();
340
        $this->setAddress($jsonLD, $addressTranslated->getAddress(), $addressTranslated->getLanguage());
341
        return $document->withBody($jsonLD);
342
    }
343
344
    /**
345
     * @param \stdClass $jsonLd
346
     * @param Address $address
347
     * @param Language $language
348
     */
349
    protected function setAddress(\stdClass $jsonLd, Address $address, Language $language)
350
    {
351
        if (!isset($jsonLd->address)) {
352
            $jsonLd->address = new \stdClass();
353
        }
354
355
        if (isset($jsonLd->address->streetAddress)) {
356
            // Old projections have their address in a single language.
357
            // Set the old address as the address for the main language before
358
            // updating it or adding another address.
359
            // @replay_i18n
360
            // @see https://jira.uitdatabank.be/browse/III-2201
361
            $mainLanguageCode = $this->getMainLanguage($jsonLd)->getCode();
362
            $jsonLd->address = (object) [
363
                $mainLanguageCode => $jsonLd->address,
364
            ];
365
        }
366
367
        $jsonLd->address->{$language->getCode()} = $address->toJsonLd();
368
    }
369
370
    /**
371
     * @param GeoCoordinatesUpdated $geoCoordinatesUpdated
372
     * @return JsonDocument
373
     */
374 View Code Duplication
    protected function applyGeoCoordinatesUpdated(GeoCoordinatesUpdated $geoCoordinatesUpdated)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
375
    {
376
        $document = $this->loadPlaceDocumentFromRepositoryById($geoCoordinatesUpdated->getItemId());
377
378
        $placeLd = $document->getBody();
379
380
        $placeLd->geo = (object) [
381
            'latitude' => $geoCoordinatesUpdated->getCoordinates()->getLatitude()->toDouble(),
382
            'longitude' => $geoCoordinatesUpdated->getCoordinates()->getLongitude()->toDouble(),
383
        ];
384
385
        return $document->withBody($placeLd);
386
    }
387
388
    /**
389
     * @param OrganizerProjectedToJSONLD $organizerProjectedToJSONLD
390
     * @return JsonDocument[]
391
     *
392
     * @throws \CultuurNet\UDB3\EntityNotFoundException
393
     */
394 View Code Duplication
    protected function applyOrganizerProjectedToJSONLD(
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
395
        OrganizerProjectedToJSONLD $organizerProjectedToJSONLD
396
    ) {
397
        $placeIds = $this->placeRelations->getPlacesOrganizedByOrganizer(
398
            $organizerProjectedToJSONLD->getId()
399
        );
400
401
        $organizer = $this->organizerService->getEntity(
402
            $organizerProjectedToJSONLD->getId()
403
        );
404
405
        $documents = [];
406
407
        foreach ($placeIds as $placeId) {
408
            $document = $this->loadDocumentFromRepositoryByItemId($placeId);
409
            $placeLD = $document->getBody();
410
411
            $newPlaceLD = clone $placeLD;
412
            $newPlaceLD->organizer = json_decode($organizer);
413
414
            if ($newPlaceLD != $placeLD) {
415
                $documents[] = $document->withBody($newPlaceLD);
416
            }
417
        }
418
419
        return $documents;
420
    }
421
422
    /**
423
     * @param string $itemId
424
     * @return JsonDocument
425
     */
426
    protected function loadPlaceDocumentFromRepositoryById($itemId)
427
    {
428
        $document = $this->repository->get($itemId);
429
430
        if (!$document) {
431
            return $this->newDocument($itemId);
432
        }
433
434
        return $document;
435
    }
436
437
    /**
438
     * @return string
439
     */
440
    protected function getLabelAddedClassName()
441
    {
442
        return LabelAdded::class;
443
    }
444
445
    /**
446
     * @return string
447
     */
448
    protected function getLabelRemovedClassName()
449
    {
450
        return LabelRemoved::class;
451
    }
452
453
    /**
454
     * @return string
455
     */
456
    protected function getImageAddedClassName()
457
    {
458
        return ImageAdded::class;
459
    }
460
461
    /**
462
     * @return string
463
     */
464
    protected function getImageRemovedClassName()
465
    {
466
        return ImageRemoved::class;
467
    }
468
469
    /**
470
     * @return string
471
     */
472
    protected function getImageUpdatedClassName()
473
    {
474
        return ImageUpdated::class;
475
    }
476
477
    protected function getMainImageSelectedClassName()
478
    {
479
        return MainImageSelected::class;
480
    }
481
482
    /**
483
     * @return string
484
     */
485
    protected function getTitleTranslatedClassName()
486
    {
487
        return TitleTranslated::class;
488
    }
489
490
    /**
491
     * @return string
492
     */
493
    protected function getDescriptionTranslatedClassName()
494
    {
495
        return DescriptionTranslated::class;
496
    }
497
498
    /**
499
     * @return string
500
     */
501
    protected function getOrganizerUpdatedClassName()
502
    {
503
        return OrganizerUpdated::class;
504
    }
505
506
    /**
507
     * @return string
508
     */
509
    protected function getOrganizerDeletedClassName()
510
    {
511
        return OrganizerDeleted::class;
512
    }
513
514
    protected function getBookingInfoUpdatedClassName()
515
    {
516
        return BookingInfoUpdated::class;
517
    }
518
519
    /**
520
     * @return string
521
     */
522
    protected function getPriceInfoUpdatedClassName()
523
    {
524
        return PriceInfoUpdated::class;
525
    }
526
527
    protected function getContactPointUpdatedClassName()
528
    {
529
        return ContactPointUpdated::class;
530
    }
531
532
    protected function getDescriptionUpdatedClassName()
533
    {
534
        return DescriptionUpdated::class;
535
    }
536
537
    protected function getCalendarUpdatedClassName()
538
    {
539
        return CalendarUpdated::class;
540
    }
541
542
    protected function getTypicalAgeRangeUpdatedClassName()
543
    {
544
        return TypicalAgeRangeUpdated::class;
545
    }
546
547
    protected function getTypicalAgeRangeDeletedClassName()
548
    {
549
        return TypicalAgeRangeDeleted::class;
550
    }
551
552
    protected function getPublishedClassName()
553
    {
554
        return Published::class;
555
    }
556
557
    protected function getApprovedClassName()
558
    {
559
        return Approved::class;
560
    }
561
562
    protected function getRejectedClassName()
563
    {
564
        return Rejected::class;
565
    }
566
567
    protected function getFlaggedAsDuplicateClassName()
568
    {
569
        return FlaggedAsDuplicate::class;
570
    }
571
572
    protected function getFlaggedAsInappropriateClassName()
573
    {
574
        return FlaggedAsInappropriate::class;
575
    }
576
577
    protected function getImagesImportedFromUdb2ClassName()
578
    {
579
        return ImagesImportedFromUDB2::class;
580
    }
581
582
    protected function getImagesUpdatedFromUdb2ClassName()
583
    {
584
        return ImagesUpdatedFromUDB2::class;
585
    }
586
587
    protected function getTitleUpdatedClassName()
588
    {
589
        return TitleUpdated::class;
590
    }
591
592
    protected function getTypeUpdatedClassName()
593
    {
594
        return TypeUpdated::class;
595
    }
596
597
    protected function getThemeUpdatedClassName()
598
    {
599
        return ThemeUpdated::class;
600
    }
601
602
    protected function getFacilitiesUpdatedClassName()
603
    {
604
        return FacilitiesUpdated::class;
605
    }
606
}
607