Skip to content

Commit

Permalink
OP-327: ecs
Browse files Browse the repository at this point in the history
  • Loading branch information
jkindly committed Jul 17, 2024
1 parent fc37216 commit 9d0ebb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ public function render(ContentConfigurationInterface $contentConfiguration): str

/** @var MediaInterface[] $mediaEntities */
$mediaEntities = $this->mediaRepository->findBy(['code' => $codes]);
$mediaEntitiesByCode = array_reduce($mediaEntities, static function(array $result, MediaInterface $media) {
$mediaEntitiesByCode = array_reduce($mediaEntities, static function (array $result, MediaInterface $media) {
$result[$media->getCode()] = $media;

return $result;
}, []);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function render(ContentConfigurationInterface $contentConfiguration): str
$code = $contentConfiguration->getConfiguration()['single_media'];
$media = [
'renderedContent' => $this->renderMediaRuntime->renderMedia($code),
'entity' => $this->mediaRepository->findOneBy(['code' => $code])
'entity' => $this->mediaRepository->findOneBy(['code' => $code]),
];

return $this->twig->render('@BitBagSyliusCmsPlugin/Shop/ContentElement/index.html.twig', [
Expand Down

0 comments on commit 9d0ebb2

Please sign in to comment.