@@ -50,11 +50,6 @@ class RemoveDeletedImagesFromCache
50
50
*/
51
51
private ParamsBuilder $ imageParamsBuilder ;
52
52
53
- /**
54
- * @var Image
55
- */
56
- private Image $ imageHelper ;
57
-
58
53
/**
59
54
* @var ConvertImageMiscParamsToReadableFormat
60
55
*/
@@ -66,7 +61,6 @@ class RemoveDeletedImagesFromCache
66
61
* @param Config $mediaConfig
67
62
* @param Filesystem $filesystem
68
63
* @param ParamsBuilder $imageParamsBuilder
69
- * @param Image $imageHelper
70
64
* @param ConvertImageMiscParamsToReadableFormat $convertImageMiscParamsToReadableFormat
71
65
* @throws FileSystemException
72
66
*/
@@ -76,29 +70,25 @@ public function __construct(
76
70
Config $ mediaConfig ,
77
71
Filesystem $ filesystem ,
78
72
ParamsBuilder $ imageParamsBuilder ,
79
- Image $ imageHelper ,
80
73
ConvertImageMiscParamsToReadableFormat $ convertImageMiscParamsToReadableFormat
81
74
) {
82
75
$ this ->presentationConfig = $ presentationConfig ;
83
76
$ this ->encryptor = $ encryptor ;
84
77
$ this ->mediaConfig = $ mediaConfig ;
85
78
$ this ->mediaDirectory = $ filesystem ->getDirectoryWrite (DirectoryList::MEDIA );
86
79
$ this ->imageParamsBuilder = $ imageParamsBuilder ;
87
- $ this ->imageHelper = $ imageHelper ;
88
80
$ this ->convertImageMiscParamsToReadableFormat = $ convertImageMiscParamsToReadableFormat ;
89
81
}
90
82
91
83
/**
92
84
* Remove deleted images from cache.
93
85
*
94
- * @param Product $product
95
86
* @param array $files
96
87
* @return null
97
88
* @throws FileSystemException
98
89
*/
99
- public function removeDeletedImagesFromCache (Product $ product , array $ files )
90
+ public function removeDeletedImagesFromCache (array $ files )
100
91
{
101
- $ this ->imageHelper ->init ($ product , 'product_page_image_small ' );
102
92
$ imageArguments = $ this ->presentationConfig
103
93
->getViewConfig (['area ' => \Magento \Framework \App \Area::AREA_FRONTEND ])
104
94
->getMediaAttributes (
0 commit comments