| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | 1 | public function exportContextData() |
|
| 21 | { |
||
| 22 | 1 | $dataWrapper = $this->getDataWrapper(); |
|
| 23 | 1 | $imageCollection = []; |
|
| 24 | |||
| 25 | 1 | foreach ($dataWrapper->getImageCollection() as $image) { |
|
| 26 | 1 | $imageCollection[] = [ |
|
| 27 | 1 | 'position' => $image->getPosition(), |
|
| 28 | 1 | 'url' => $image->getUrl() |
|
| 29 | 1 | ]; |
|
| 30 | 1 | } |
|
| 31 | |||
| 32 | 1 | return $this->prepareExport( |
|
| 33 | [ |
||
| 34 | 1 | 'sku' => $dataWrapper->getSku(), |
|
| 35 | 'image_collection' => $imageCollection |
||
| 36 | 1 | ] |
|
| 37 | 1 | ); |
|
| 38 | } |
||
| 39 | } |
||
| 40 |