|
@@ 75-93 (lines=19) @@
|
| 72 |
|
$performanceEvent->setVenue($this->translator->trans($performanceEvent->getVenue())); |
| 73 |
|
} |
| 74 |
|
|
| 75 |
|
public function onPreEmployeeSerialize(ObjectEvent $event) |
| 76 |
|
{ |
| 77 |
|
/** @var Employee $employee */ |
| 78 |
|
$employee = $event->getObject(); |
| 79 |
|
|
| 80 |
|
if ($employee->getAvatar()) { |
| 81 |
|
$avatarLinks = $this->mediaController->getMediumFormatsAction($employee->getAvatar()); |
| 82 |
|
$employee->avatarThumbnails = $avatarLinks; |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
$galleryHasMediaLinks = $this->formatGalleries( |
| 86 |
|
$employee->getGalleryHasMedia()->getValues(), |
| 87 |
|
$employee->getLocale() |
| 88 |
|
); |
| 89 |
|
|
| 90 |
|
if ($galleryHasMediaLinks) { |
| 91 |
|
$employee->galleryHasMediaThumbnails = $galleryHasMediaLinks; |
| 92 |
|
} |
| 93 |
|
} |
| 94 |
|
|
| 95 |
|
public function onPrePerformanceSerialize(ObjectEvent $event) |
| 96 |
|
{ |
|
@@ 120-135 (lines=16) @@
|
| 117 |
|
} |
| 118 |
|
} |
| 119 |
|
|
| 120 |
|
public function onPrePostSerialize(ObjectEvent $event) |
| 121 |
|
{ |
| 122 |
|
/** @var Post $post */ |
| 123 |
|
$post = $event->getObject(); |
| 124 |
|
|
| 125 |
|
if ($post->getMainPicture()) { |
| 126 |
|
$mainImageLinks = $this->mediaController->getMediumFormatsAction($post->getMainPicture()); |
| 127 |
|
$post->mainPictureThumbnails = $mainImageLinks; |
| 128 |
|
} |
| 129 |
|
|
| 130 |
|
$galleryHasMediaLinks = $this->formatGalleries($post->getGalleryHasMedia()->getValues(), $post->getLocale()); |
| 131 |
|
|
| 132 |
|
if ($galleryHasMediaLinks) { |
| 133 |
|
$post->galleryHasMediaThumbnails = $galleryHasMediaLinks; |
| 134 |
|
} |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
public function onPreHistorySerialize(ObjectEvent $event) |
| 138 |
|
{ |
|
@@ 137-155 (lines=19) @@
|
| 134 |
|
} |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
public function onPreHistorySerialize(ObjectEvent $event) |
| 138 |
|
{ |
| 139 |
|
/** @var History $history */ |
| 140 |
|
$history = $event->getObject(); |
| 141 |
|
|
| 142 |
|
if ($history->getMainPicture()) { |
| 143 |
|
$mainImageLinks = $this->mediaController->getMediumFormatsAction($history->getMainPicture()); |
| 144 |
|
$history->mainPictureThumbnails = $mainImageLinks; |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
$galleryHasMediaLinks = $this->formatGalleries( |
| 148 |
|
$history->getGalleryHasMedia()->getValues(), |
| 149 |
|
$history->getLocale() |
| 150 |
|
); |
| 151 |
|
|
| 152 |
|
if (!empty($galleryHasMediaLinks)) { |
| 153 |
|
$history->galleryHasMediaThumbnails = $galleryHasMediaLinks; |
| 154 |
|
} |
| 155 |
|
} |
| 156 |
|
|
| 157 |
|
/** |
| 158 |
|
* @param $galleries |