Skip to content

Commit 91973b7

Browse files
ENGCOM-1167: [Forwardport] Add getters to product image builder #14433
- Merge Pull Request #14433 from mastiuhin-olexandr/magento2:2.3-develop-PR-port-13414 - Merged commits: 1. 10b03e5
2 parents d2a037f + 10b03e5 commit 91973b7

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
@@ -146,6 +146,7 @@ public function create()
146146
'custom_attributes' => $this->getCustomAttributes(),
147147
'resized_image_width' => $imagesize[0],
148148
'resized_image_height' => $imagesize[1],
149+
'product_id' => $this->product->getId()
149150
],
150151
];
151152

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)