code: public function onDelete(ResourceEventInterface $event)
      {
          $item = $this->getSaleItemFromEvent($event);
  
          // Sale may be null here: if it is schedule for delete,
          // the persistence tracker won't be able to retrieve it.
          $sale = $this->getSaleFromItem($item);
  
          if (null !== $parent = $item->getParent()) {
              $parent->removeChild($item);
          } elseif (null !== $sale) {
              $sale->removeItem($item);
          }
  
          if (null !== $sale) {
              $this->scheduleSaleContentChangeEvent($sale);
          }
      }
docs: Delete event handler.
  
  @param ResourceEventInterface $event