protected function getProductPhoto(MediaInterface $media, ProductInterface $modelData, $values)
    {
        $mainPhoto    = $this->isMainPhoto($media, $values['main']);
        $productPhoto = new ProductPhoto();
        $productPhoto->setPhoto($media);
        $productPhoto->setMainPhoto($mainPhoto);
        $productPhoto->setProduct($modelData);
        
        if ($mainPhoto) {
            $modelData->setPhoto($media);
        }
        
        return $productPhoto;
    }