Skip to content

Commit 4236bd9

Browse files
author
Stanislav Idolov
authored
ENGCOM-865: Add getters to product image builder #13414
2 parents 79ec959 + d238eca commit 4236bd9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

app/code/Magento/Catalog/Block/Product/ImageBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ public function create()
154154
'custom_attributes' => $this->getCustomAttributes(),
155155
'resized_image_width' => $imagesize[0],
156156
'resized_image_height' => $imagesize[1],
157+
'product_id' => $this->product->getId()
157158
],
158159
];
159160

app/code/Magento/Catalog/Test/Unit/Block/Product/ImageBuilderTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ private function getTestDataWithoutAttributes(): array
252252
'custom_attributes' => '',
253253
'resized_image_width' => 100,
254254
'resized_image_height' => 100,
255+
'product_id' => null
255256
],
256257
],
257258
];
@@ -286,6 +287,7 @@ private function getTestDataWithAttributes(): array
286287
'custom_attributes' => 'name_1="value_1" name_2="value_2"',
287288
'resized_image_width' => 120,
288289
'resized_image_height' => 70,
290+
'product_id' => null
289291
],
290292
],
291293
];

0 commit comments

Comments
 (0)