Adapter/PlentymarketsAdapter/ResponseParser/Category/CategoryResponseParser.php
private function getImages(array $detail, &$result)
    {
        $imageIdentifiers = [];

        $images = [];

        if (!empty($detail['imagePath'])) {
            $images[] = $detail['imagePath'];
        }

        if (!empty($detail['image2Path'])) {
            $images[] = $detail['image2Path'];
        }

        foreach ($images as $image) {
            try {
                $media = $this->mediaResponseParser->parse([
                    'mediaCategory' => MediaCategoryHelper::CATEGORY,
                    'id' => sha1(json_encode($image)),
                    'link' => $this->getBaseUrl() . 'documents/' . $image,
                    'name' => $detail['name'],
                    'alternateName' => $detail['name'],
                ]);

                $result[$media->getIdentifier()] = $media;

                $imageIdentifiers[] = $media->getIdentifier();
            } catch (Exception $exception) {
                $this->logger->notice('error while processing category image', ['name' => $detail['name']]);
            }
        }

        return $imageIdentifiers;
    }
private function getImages(array $detail, &$result)
    {
        $imageIdentifiers = [];

        $images = [];

        if (!empty($detail['imagePath'])) {
            $images[] = $detail['imagePath'];
        }

        if (!empty($detail['image2Path'])) {
            $images[] = $detail['image2Path'];
        }

        foreach ($images as $image) {
            try {
                $media = $this->mediaResponseParser->parse([
                    'mediaCategory' => MediaCategoryHelper::CATEGORY,
                    'id' => sha1(json_encode($image)),
                    'link' => $this->getBaseUrl() . 'documents/' . $image,
                    'name' => $detail['name'],
                    'alternateName' => $detail['name'],
                ]);

                $result[$media->getIdentifier()] = $media;

                $imageIdentifiers[] = $media->getIdentifier();
            } catch (Exception $exception) {
                $this->logger->notice('error while processing category image', ['name' => $detail['name']]);
            }
        }

        return $imageIdentifiers;
    }
@param array $detail
@param array $result

@return array