Commit ad3b960c by liumengfei

优化bug

parent fbe0e8b4
...@@ -17,7 +17,6 @@ use Magento\Framework\Exception\StateException; ...@@ -17,7 +17,6 @@ use Magento\Framework\Exception\StateException;
use Magento\Framework\Api\ImageContentValidatorInterface; use Magento\Framework\Api\ImageContentValidatorInterface;
use Magento\Framework\View\Asset\NotationResolver\Variable; use Magento\Framework\View\Asset\NotationResolver\Variable;
use Magento\Framework\Webapi\Rest\Request; use Magento\Framework\Webapi\Rest\Request;
use Magento\Catalog\Model\Product\Gallery\DeleteValidator;
/** /**
* Class GalleryManagement * Class GalleryManagement
...@@ -43,10 +42,6 @@ class GalleryManagement implements \Joshine\Catalog\Api\ProductAttributeMediaGal ...@@ -43,10 +42,6 @@ class GalleryManagement implements \Joshine\Catalog\Api\ProductAttributeMediaGal
*/ */
private $productInterfaceFactory; private $productInterfaceFactory;
/**
* @var DeleteValidator
*/
private $deleteValidator;
protected $entry; protected $entry;
...@@ -63,15 +58,12 @@ class GalleryManagement implements \Joshine\Catalog\Api\ProductAttributeMediaGal ...@@ -63,15 +58,12 @@ class GalleryManagement implements \Joshine\Catalog\Api\ProductAttributeMediaGal
ImageContentValidatorInterface $contentValidator, ImageContentValidatorInterface $contentValidator,
ProductAttributeMediaGalleryEntryInterface $entry, ProductAttributeMediaGalleryEntryInterface $entry,
?ProductInterfaceFactory $productInterfaceFactory = null, ?ProductInterfaceFactory $productInterfaceFactory = null,
?DeleteValidator $deleteValidator = null
) { ) {
$this->productRepository = $productRepository; $this->productRepository = $productRepository;
$this->contentValidator = $contentValidator; $this->contentValidator = $contentValidator;
$this->productInterfaceFactory = $productInterfaceFactory $this->productInterfaceFactory = $productInterfaceFactory
?? ObjectManager::getInstance()->get(ProductInterfaceFactory::class); ?? ObjectManager::getInstance()->get(ProductInterfaceFactory::class);
$this->deleteValidator = $deleteValidator
?? ObjectManager::getInstance()->get(DeleteValidator::class);
$this->entry = $entry; $this->entry = $entry;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment