Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
RemoveQuoteItems.php
Go to the documentation of this file.
1 <?php
7 
9 
11 {
15  private $quoteItemsCleaner;
16 
20  public function __construct(\Magento\Quote\Model\Product\QuoteItemsCleanerInterface $quoteItemsCleaner)
21  {
22  $this->quoteItemsCleaner = $quoteItemsCleaner;
23  }
24 
32  public function afterDelete(
33  ProductResource $subject,
34  ProductResource $result,
35  \Magento\Catalog\Api\Data\ProductInterface $product
36  ) {
37  $this->quoteItemsCleaner->execute($product);
38  return $result;
39  }
40 }
afterDelete(ProductResource $subject, ProductResource $result, \Magento\Catalog\Api\Data\ProductInterface $product)
__construct(\Magento\Quote\Model\Product\QuoteItemsCleanerInterface $quoteItemsCleaner)