11 use Magento\Customer\Api\Data\AddressInterfaceFactory;
12 use Magento\Customer\Api\Data\CustomerInterfaceFactory;
14 use Magento\Framework\DataObjectFactory as ObjectFactory;
26 private $quoteFactory;
61 \
Magento\Framework\Registry $coreRegistry,
65 \
Magento\Customer\Model\Metadata\FormFactory $formFactory,
67 \
Magento\Customer\Helper\View $viewHelper,
68 \
Magento\Framework\Math\Random $random,
70 \
Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter,
79 ObjectFactory $objectFactory,
98 $extensibleDataObjectConverter,
114 $this->quoteFactory = $quoteFactory ?: $this->_objectManager->get(\
Magento\
Quote\Model\QuoteFactory::class);
128 $deleteItemId = $this->
getRequest()->getPost(
'delete');
135 }
catch (\
Magento\Framework\Exception\NoSuchEntityException $e) {
136 $quote = $this->quoteFactory->create();
139 $this->_objectManager->get(\
Magento\Store\Model\StoreManagerInterface::class)->getWebsite(
$websiteId)
143 $quote->removeItem($deleteItemId);
148 $resultLayout = $this->resultLayoutFactory->create();
149 $resultLayout->getLayout()->getBlock(
'admin.customer.view.edit.cart')->setWebsiteId(
$websiteId);
150 return $resultLayout;
__construct(\Magento\Backend\App\Action\Context $context, \Magento\Framework\Registry $coreRegistry, \Magento\Framework\App\Response\Http\FileFactory $fileFactory, \Magento\Customer\Model\CustomerFactory $customerFactory, \Magento\Customer\Model\AddressFactory $addressFactory, \Magento\Customer\Model\Metadata\FormFactory $formFactory, \Magento\Newsletter\Model\SubscriberFactory $subscriberFactory, \Magento\Customer\Helper\View $viewHelper, \Magento\Framework\Math\Random $random, CustomerRepositoryInterface $customerRepository, \Magento\Framework\Api\ExtensibleDataObjectConverter $extensibleDataObjectConverter, Mapper $addressMapper, AccountManagementInterface $customerAccountManagement, AddressRepositoryInterface $addressRepository, CustomerInterfaceFactory $customerDataFactory, AddressInterfaceFactory $addressDataFactory, \Magento\Customer\Model\Customer\Mapper $customerMapper, \Magento\Framework\Reflection\DataObjectProcessor $dataObjectProcessor, DataObjectHelper $dataObjectHelper, ObjectFactory $objectFactory, \Magento\Framework\View\LayoutFactory $layoutFactory, \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory, \Magento\Framework\View\Result\PageFactory $resultPageFactory, \Magento\Backend\Model\View\Result\ForwardFactory $resultForwardFactory, \Magento\Framework\Controller\Result\JsonFactory $resultJsonFactory, \Magento\Quote\Model\QuoteFactory $quoteFactory=null)
$customerAccountManagement