shouldAddThumbnails example

$data = $this->updateMedia($data);
        }

        if (isset($data['__media_width'])) {
            $media->setWidth((int) $data['__media_width']);
        }

        if (isset($data['__media_height'])) {
            $media->setHeight((int) $data['__media_height']);
        }

        if ($this->shouldAddThumbnails($media->getType()$data)) {
            $media->setThumbnails(
                $this->getMediaThumbnails($data)
            );
        }

        if (!empty($data['__mediaAttribute_id'])) {
            $this->attributeHydrator->addAttribute($media$data, 'mediaAttribute', 'media');
        }

        return $media;
    }

    
Home | Imprint | This part of the site doesn't use cookies.