commit eafadcaf9446615156c7b69510e07f86400cd19e Author: Lukas Schlachter Date: Wed Dec 11 23:14:02 2024 +0100 implemented missing handler logic for new gallery multi features diff --git a/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php b/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php index 70927fc69c..6752e3ac22 100644 --- a/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php +++ b/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php @@ -8,6 +8,7 @@ use EHG\CoreBundle\OptionsProviders\MediaTagsOptionsProvider; use EHG\CoreBundle\Service\ApplicationContextStorage; use EHG\CoreBundle\ValueObject\Country; use Pimcore\Model\DataObject\Data\Hotspotimage; +use Pimcore\Model\Document\Editable\Checkbox; use WhitelabelSolution\FrontendBundle\BrickConstants; use WhitelabelSolution\FrontendBundle\Contract\BrandSpecificBrickValueObjectHandler; use WhitelabelSolution\FrontendBundle\Handler\AbstractBrickValueObjectHandler; @@ -45,10 +46,14 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle [ 'connected' => $connected, 'indicator' => $indicator, - 'media' => $media + 'media' => $media, + 'notAlignCenter' => $notAlignCenter, + 'showAllDescriptions' => $showAllDescriptions, ] = $brickEditables; $connected = $connected && !$connected->isEmpty() ? $connected->getData() : false; + $notAlignCenter = $notAlignCenter instanceof Checkbox && $notAlignCenter->isChecked(); + $showAllDescriptions = $showAllDescriptions instanceof Checkbox && $showAllDescriptions->isChecked(); $indicator = $indicator && !$indicator->isEmpty() ? $indicator->getData() : ''; $context = ApplicationContextStorage::getApplicationContext(); @@ -69,7 +74,9 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle new GalleryMultiMolecule( $this->generateHeading($brickEditables), $indicator, - $slides + $slides, + !$notAlignCenter, + $showAllDescriptions ) ); } @@ -85,7 +92,8 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle 'manual' => $manual, 'highlight' => $highlight, 'image' => $image, - 'caption' => $caption + 'caption' => $caption, + 'imageLightBox' => $imageLightBox ] = $mediaItem; if ($manual && !$manual->isEmpty() && $manual->isChecked()) { @@ -94,6 +102,7 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle } $imageAsset = $image->getImage(); + $imageLightBoxAsset = $imageLightBox instanceof \Pimcore\Model\Document\Editable\Image && !$imageLightBox->isEmpty() ? $imageLightBox : $image; if ($imageAsset && $imageAsset->getWidth() < $imageAsset->getHeight()) { $imageThumbnails = [ @@ -106,15 +115,11 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle $imageAsset->getMetadata('alt'), $this->imageSizesService->generateSizesSetForAssetAndThumbnails($image, $imageThumbnails) ); - $imageLightboxAtom = new Image( - '', - $imageAsset->getMetadata($image), - $this->imageSizesService->generateSizesSetForAssetAndThumbnails($image, ['wls-feature-highlights-lightbox']) - ); + } else { $highlight = $highlight && !$highlight->isEmpty() ? $highlight->getElement() : []; if ($highlight instanceof \AppBundle\Model\DataObject\PIM\Highlight) { - $image = $highlight->getTeaserImage(); + $imageLightBoxAsset = $image = $highlight->getTeaserImage(); $caption = $highlight->getTeaserText(); $this->extractAdditionalMedia( @@ -151,7 +156,7 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle return new GalleryMultiItem( $imageAtom, - $image->getThumbnail('wls-feature-highlights-lightbox'), + $imageLightBoxAsset->getThumbnail('wls-feature-highlights-lightbox'), $caption ?? ' ' ); } commit eafadcaf9446615156c7b69510e07f86400cd19e Author: Lukas Schlachter Date: Wed Dec 11 23:14:02 2024 +0100 implemented missing handler logic for new gallery multi features diff --git a/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php b/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php index 70927fc69c..6752e3ac22 100644 --- a/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php +++ b/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php @@ -8,6 +8,7 @@ use EHG\CoreBundle\OptionsProviders\MediaTagsOptionsProvider; use EHG\CoreBundle\Service\ApplicationContextStorage; use EHG\CoreBundle\ValueObject\Country; use Pimcore\Model\DataObject\Data\Hotspotimage; +use Pimcore\Model\Document\Editable\Checkbox; use WhitelabelSolution\FrontendBundle\BrickConstants; use WhitelabelSolution\FrontendBundle\Contract\BrandSpecificBrickValueObjectHandler; use WhitelabelSolution\FrontendBundle\Handler\AbstractBrickValueObjectHandler; @@ -45,10 +46,14 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle [ 'connected' => $connected, 'indicator' => $indicator, - 'media' => $media + 'media' => $media, + 'notAlignCenter' => $notAlignCenter, + 'showAllDescriptions' => $showAllDescriptions, ] = $brickEditables; $connected = $connected && !$connected->isEmpty() ? $connected->getData() : false; + $notAlignCenter = $notAlignCenter instanceof Checkbox && $notAlignCenter->isChecked(); + $showAllDescriptions = $showAllDescriptions instanceof Checkbox && $showAllDescriptions->isChecked(); $indicator = $indicator && !$indicator->isEmpty() ? $indicator->getData() : ''; $context = ApplicationContextStorage::getApplicationContext(); @@ -69,7 +74,9 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle new GalleryMultiMolecule( $this->generateHeading($brickEditables), $indicator, - $slides + $slides, + !$notAlignCenter, + $showAllDescriptions ) ); } @@ -85,7 +92,8 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle 'manual' => $manual, 'highlight' => $highlight, 'image' => $image, - 'caption' => $caption + 'caption' => $caption, + 'imageLightBox' => $imageLightBox ] = $mediaItem; if ($manual && !$manual->isEmpty() && $manual->isChecked()) { @@ -94,6 +102,7 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle } $imageAsset = $image->getImage(); + $imageLightBoxAsset = $imageLightBox instanceof \Pimcore\Model\Document\Editable\Image && !$imageLightBox->isEmpty() ? $imageLightBox : $image; if ($imageAsset && $imageAsset->getWidth() < $imageAsset->getHeight()) { $imageThumbnails = [ @@ -106,15 +115,11 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle $imageAsset->getMetadata('alt'), $this->imageSizesService->generateSizesSetForAssetAndThumbnails($image, $imageThumbnails) ); - $imageLightboxAtom = new Image( - '', - $imageAsset->getMetadata($image), - $this->imageSizesService->generateSizesSetForAssetAndThumbnails($image, ['wls-feature-highlights-lightbox']) - ); + } else { $highlight = $highlight && !$highlight->isEmpty() ? $highlight->getElement() : []; if ($highlight instanceof \AppBundle\Model\DataObject\PIM\Highlight) { - $image = $highlight->getTeaserImage(); + $imageLightBoxAsset = $image = $highlight->getTeaserImage(); $caption = $highlight->getTeaserText(); $this->extractAdditionalMedia( @@ -151,7 +156,7 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle return new GalleryMultiItem( $imageAtom, - $image->getThumbnail('wls-feature-highlights-lightbox'), + $imageLightBoxAsset->getThumbnail('wls-feature-highlights-lightbox'), $caption ?? ' ' ); } commit eafadcaf9446615156c7b69510e07f86400cd19e Author: Lukas Schlachter Date: Wed Dec 11 23:14:02 2024 +0100 implemented missing handler logic for new gallery multi features diff --git a/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php b/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php index 70927fc69c..6752e3ac22 100644 --- a/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php +++ b/src/WhitelabelSolution/FrontendBundle/Handler/Brand/Dethleffs/GalleryMultiBrickValueObjectHandler.php @@ -8,6 +8,7 @@ use EHG\CoreBundle\OptionsProviders\MediaTagsOptionsProvider; use EHG\CoreBundle\Service\ApplicationContextStorage; use EHG\CoreBundle\ValueObject\Country; use Pimcore\Model\DataObject\Data\Hotspotimage; +use Pimcore\Model\Document\Editable\Checkbox; use WhitelabelSolution\FrontendBundle\BrickConstants; use WhitelabelSolution\FrontendBundle\Contract\BrandSpecificBrickValueObjectHandler; use WhitelabelSolution\FrontendBundle\Handler\AbstractBrickValueObjectHandler; @@ -45,10 +46,14 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle [ 'connected' => $connected, 'indicator' => $indicator, - 'media' => $media + 'media' => $media, + 'notAlignCenter' => $notAlignCenter, + 'showAllDescriptions' => $showAllDescriptions, ] = $brickEditables; $connected = $connected && !$connected->isEmpty() ? $connected->getData() : false; + $notAlignCenter = $notAlignCenter instanceof Checkbox && $notAlignCenter->isChecked(); + $showAllDescriptions = $showAllDescriptions instanceof Checkbox && $showAllDescriptions->isChecked(); $indicator = $indicator && !$indicator->isEmpty() ? $indicator->getData() : ''; $context = ApplicationContextStorage::getApplicationContext(); @@ -69,7 +74,9 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle new GalleryMultiMolecule( $this->generateHeading($brickEditables), $indicator, - $slides + $slides, + !$notAlignCenter, + $showAllDescriptions ) ); } @@ -85,7 +92,8 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle 'manual' => $manual, 'highlight' => $highlight, 'image' => $image, - 'caption' => $caption + 'caption' => $caption, + 'imageLightBox' => $imageLightBox ] = $mediaItem; if ($manual && !$manual->isEmpty() && $manual->isChecked()) { @@ -94,6 +102,7 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle } $imageAsset = $image->getImage(); + $imageLightBoxAsset = $imageLightBox instanceof \Pimcore\Model\Document\Editable\Image && !$imageLightBox->isEmpty() ? $imageLightBox : $image; if ($imageAsset && $imageAsset->getWidth() < $imageAsset->getHeight()) { $imageThumbnails = [ @@ -106,15 +115,11 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle $imageAsset->getMetadata('alt'), $this->imageSizesService->generateSizesSetForAssetAndThumbnails($image, $imageThumbnails) ); - $imageLightboxAtom = new Image( - '', - $imageAsset->getMetadata($image), - $this->imageSizesService->generateSizesSetForAssetAndThumbnails($image, ['wls-feature-highlights-lightbox']) - ); + } else { $highlight = $highlight && !$highlight->isEmpty() ? $highlight->getElement() : []; if ($highlight instanceof \AppBundle\Model\DataObject\PIM\Highlight) { - $image = $highlight->getTeaserImage(); + $imageLightBoxAsset = $image = $highlight->getTeaserImage(); $caption = $highlight->getTeaserText(); $this->extractAdditionalMedia( @@ -151,7 +156,7 @@ class GalleryMultiBrickValueObjectHandler extends AbstractBrickValueObjectHandle return new GalleryMultiItem( $imageAtom, - $image->getThumbnail('wls-feature-highlights-lightbox'), + $imageLightBoxAsset->getThumbnail('wls-feature-highlights-lightbox'), $caption ?? ' ' ); } An Error Occurred: Internal Server Error

Oops! An Error Occurred

The server returned a "500 Internal Server Error".

Something is broken. Please let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.