| @@ 38-52 (lines=15) @@ | ||
| 35 | $this->contentListItemRepository = $contentListItemRepository; |
|
| 36 | } |
|
| 37 | ||
| 38 | public static function getSubscribedEvents() |
|
| 39 | { |
|
| 40 | return [ |
|
| 41 | [ |
|
| 42 | 'event' => 'serializer.pre_serialize', |
|
| 43 | 'class' => ContentList::class, |
|
| 44 | 'method' => 'onPreSerialize', |
|
| 45 | ], |
|
| 46 | [ |
|
| 47 | 'event' => 'serializer.post_serialize', |
|
| 48 | 'class' => ContentList::class, |
|
| 49 | 'method' => 'onPostSerialize', |
|
| 50 | ], |
|
| 51 | ]; |
|
| 52 | } |
|
| 53 | ||
| 54 | public function onPreSerialize(ObjectEvent $event) |
|
| 55 | { |
|
| @@ 54-68 (lines=15) @@ | ||
| 51 | $this->tenantProvider = $tenantProvider; |
|
| 52 | } |
|
| 53 | ||
| 54 | public static function getSubscribedEvents(): array |
|
| 55 | { |
|
| 56 | return [ |
|
| 57 | [ |
|
| 58 | 'event' => 'serializer.post_serialize', |
|
| 59 | 'class' => Article::class, |
|
| 60 | 'method' => 'onPostSerialize', |
|
| 61 | ], |
|
| 62 | [ |
|
| 63 | 'event' => 'serializer.pre_serialize', |
|
| 64 | 'class' => Article::class, |
|
| 65 | 'method' => 'onPreSerialize', |
|
| 66 | ], |
|
| 67 | ]; |
|
| 68 | } |
|
| 69 | ||
| 70 | public function onPreSerialize(ObjectEvent $event): void |
|
| 71 | { |
|