Skip to content

Commit

Permalink
fix missing image properties
Browse files Browse the repository at this point in the history
  • Loading branch information
vvohh committed Oct 13, 2023
1 parent 89c0b05 commit 544e79f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,9 @@

All notable changes to this project will be documented in this file.

## [2.230.1] - 2023-10-13
- Fixed: missing image custom properties

## [2.230.0] - 2023-10-12
- Added: AuthorField class as new mechanic to add author field
- Deprecated: DcaUtil::addAuthorFieldAndCallback()
Expand Down
21 changes: 4 additions & 17 deletions src/Twig/ImageExtension.php
Expand Up @@ -76,7 +76,6 @@ public function getImage($image, $size = null, array $data = [], string $templat
*/
public function getImageData($image, $size = null, array $data = []): array
{
// $imageData = [];

$data['singleSRC'] = $image;
$size = $data['size'] = \is_array($size) ? $size : StringUtil::deserialize($size);
Expand All @@ -86,8 +85,6 @@ public function getImageData($image, $size = null, array $data = []): array
unset($data['size']);
}

// $this->container->get('huh.utils.image')->addToTemplateData('image', 'addImage', $imageData, $data);

$fileModel = null;

if (Validator::isUuid($image))
Expand All @@ -109,21 +106,11 @@ public function getImageData($image, $size = null, array $data = []): array
$template->picture = $picture;
}

return $template->getData();

/*
if (empty($imageData)) {
return [];
}
$templateData = $template->getData();
// merge the rest of the custom configs
$templateData = array_merge($templateData, $data);

$result = array_merge($imageData, $data);
if (isset($imageData['picture']) && isset($data['picture'])) {
$result['picture'] = array_merge($imageData['picture'], $data['picture']);
}
return $result;
*/
return $templateData;
}

/**
Expand Down

0 comments on commit 544e79f

Please sign in to comment.