File tree Expand file tree Collapse file tree 6 files changed +18
-7
lines changed
MediaGallerySynchronization Expand file tree Collapse file tree 6 files changed +18
-7
lines changed Original file line number Diff line number Diff line change 55 */
66declare (strict_types=1 );
77
8- namespace Magento \MediaGallerySynchronization \Model ;
8+ namespace Magento \MediaGalleryRenditions \Model ;
99
1010use Magento \MediaGallerySynchronizationApi \Api \ImportFileInterface ;
1111use Magento \MediaGallerySynchronization \Model \Filesystem \SplFileInfoFactory ;
12+ use Magento \MediaGallerySynchronization \Model \CreateAssetFromFile ;
1213use Magento \MediaGalleryRenditionsApi \Api \GenerateRenditionsInterface ;
1314
1415/**
@@ -52,7 +53,6 @@ public function __construct(
5253 public function execute (string $ path ): void
5354 {
5455 $ file = $ this ->splFileInfoFactory ->create ($ path );
55- $ createdAsset = $ this ->createAssetFromFile ->execute ($ file );
56- $ this ->generateRenditions ->execute ([$ createdAsset ]);
56+ $ this ->generateRenditions ->execute ([$ this ->createAssetFromFile ->execute ($ file )]);
5757 }
5858}
Original file line number Diff line number Diff line change 33 "description" : " Magento module that implements height and width fields for for media gallery items." ,
44 "require" : {
55 "php" : " ~7.3.0||~7.4.0" ,
6- "magento/framework" : " *"
6+ "magento/framework" : " *" ,
7+ "magento/module-media-gallery-synchronization-api" : " *" ,
8+ "magento/module-media-gallery-synchronization" : " *"
79 },
810 "type" : " magento2-module" ,
911 "license" : [
Original file line number Diff line number Diff line change 99 <preference for =" Magento\MediaGalleryRenditionsApi\Model\ConfigInterface" type =" Magento\MediaGalleryRenditions\Model\Config" />
1010 <preference for =" Magento\MediaGalleryRenditionsApi\Api\GenerateRenditionsInterface" type =" Magento\MediaGalleryRenditions\Model\GenerateRenditions" />
1111 <preference for =" Magento\MediaGalleryRenditionsApi\Api\GetRenditionPathInterface" type =" Magento\MediaGalleryRenditions\Model\GetRenditionPath" />
12+ <type name =" Magento\MediaGallerySynchronizationApi\Model\ImportFileComposite" >
13+ <arguments >
14+ <argument name =" importers" xsi : type =" array" >
15+ <item name =" 2" xsi : type =" object" >Magento\MediaGalleryRenditions\Model\GenerateRenditionImages</item >
16+ </argument >
17+ </arguments >
18+ </type >
1219</config >
Original file line number Diff line number Diff line change 66 */
77-->
88<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Module/etc/module.xsd" >
9- <module name =" Magento_MediaGalleryRenditions" />
9+ <module name =" Magento_MediaGalleryRenditions" >
10+ <sequence >
11+ <module name =" Magento_MediaGallerySynchronizationApi" />
12+ </sequence >
13+ </module >
1014</config >
Original file line number Diff line number Diff line change 55 "php" : " ~7.3.0||~7.4.0" ,
66 "magento/framework" : " *" ,
77 "magento/module-media-gallery-api" : " *" ,
8- "magento/module-media-gallery-renditions-api" : " *" ,
98 "magento/module-media-gallery-synchronization-api" : " *" ,
109 "magento/framework-message-queue" : " *" ,
1110 "magento/module-media-gallery-metadata-api" : " *"
Original file line number Diff line number Diff line change 1515 <argument name =" importers" xsi : type =" array" >
1616 <item name =" 0" xsi : type =" object" >Magento\MediaGallerySynchronization\Model\ImportMediaAsset</item >
1717 <item name =" 1" xsi : type =" object" >Magento\MediaGallerySynchronization\Model\ImportImageFileKeywords</item >
18- <item name =" generateRenditionImages" xsi : type =" object" >Magento\MediaGallerySynchronization\Model\GenerateRenditionImages</item >
1918 </argument >
2019 </arguments >
2120 </type >
You can’t perform that action at this time.
0 commit comments