Skip to content

Commit

Permalink
TASK: Persist focal points with thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
mficzel committed Jul 25, 2024
1 parent e164bbe commit b4eaea5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Neos.Media/Classes/Domain/Model/ThumbnailConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function getMaximumHeight()
}

/**
* @return boolean
* @return string
*/
public function getRatioMode()
{
Expand Down
4 changes: 3 additions & 1 deletion Neos.Media/Classes/Domain/Repository/ThumbnailRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function persistThumbnailDirectly(Thumbnail $thumbnail, ThumbnailConfigur
$assetIdentifier = $this->persistenceManager->getIdentifierByObject($thumbnail->getOriginalAsset());
$thumbnailResource = $thumbnail->getResource();

$sql = 'INSERT INTO neos_media_domain_model_thumbnail (persistence_object_identifier, originalasset, resource, width, height, configuration, configurationhash, staticresource, quality) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)';
$sql = 'INSERT INTO neos_media_domain_model_thumbnail (persistence_object_identifier, originalasset, resource, width, height, configuration, configurationhash, staticresource, quality, focalpointx, focalpointy) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
$params = [
$thumbnailIdentifier,
$assetIdentifier,
Expand All @@ -163,6 +163,8 @@ public function persistThumbnailDirectly(Thumbnail $thumbnail, ThumbnailConfigur
$configuration->getHash(),
$thumbnail->getStaticResource(),
$thumbnail->getQuality(),
$thumbnail->getFocalPointX(),
$thumbnail->getFocalPointY(),
];

$connection = $this->entityManager->getConnection();
Expand Down

0 comments on commit b4eaea5

Please sign in to comment.